target-mips: fix for sign-issue in MULQ_W helper

Correct sign-propagation before multiplication in MULQ_W helper.
The change also fixes previously incorrect expected values in the
tests for MULQ_RS.W and MULQ_S.W.

Signed-off-by: Petar Jovanovic <petarj@mips.com>
Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Petar Jovanovic 2013-02-07 19:36:09 +01:00 committed by Aurelien Jarno
parent 9c19eb1e20
commit a345481baa
3 changed files with 3 additions and 3 deletions

View File

@ -2689,7 +2689,7 @@ MAQ_SA_W(maq_sa_w_phr, 0);
target_ulong helper_##name(target_ulong rs, target_ulong rt, \
CPUMIPSState *env) \
{ \
uint32_t rs_t, rt_t; \
int32_t rs_t, rt_t; \
int32_t tempI; \
int64_t tempL; \
\

View File

@ -8,7 +8,7 @@ int main()
rs = 0x80001234;
rt = 0x80004321;
result = 0x80005555;
result = 0x7FFFAAAB;
__asm
("mulq_rs.w %0, %1, %2\n\t"

View File

@ -8,7 +8,7 @@ int main()
rs = 0x80001234;
rt = 0x80004321;
result = 0x80005555;
result = 0x7FFFAAAB;
__asm
("mulq_s.w %0, %1, %2\n\t"