mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
target-mips: fix for incorrect multiplication with MULQ_S.PH
The change corrects sign-related issue with MULQ_S.PH. It also includes extension to the already existing test which will trigger the issue. Signed-off-by: Petar Jovanovic <petarj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
d2123a079d
commit
9c19eb1e20
2 changed files with 16 additions and 1 deletions
|
@ -652,7 +652,7 @@ static inline int32_t mipsdsp_sat16_mul_q15_q15(uint16_t a, uint16_t b,
|
|||
temp = 0x7FFF0000;
|
||||
set_DSPControl_overflow_flag(1, 21, env);
|
||||
} else {
|
||||
temp = ((uint32_t)a * (uint32_t)b);
|
||||
temp = (int16_t)a * (int16_t)b;
|
||||
temp = temp << 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue