]> Git Repo - qemu.git/commitdiff
target-mips: fix for sign-issue in MULQ_W helper
authorPetar Jovanovic <[email protected]>
Thu, 7 Feb 2013 18:36:09 +0000 (19:36 +0100)
committerAurelien Jarno <[email protected]>
Sat, 23 Feb 2013 21:20:45 +0000 (22:20 +0100)
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 <[email protected]>
Richard Henderson <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
target-mips/dsp_helper.c
tests/tcg/mips/mips32-dspr2/mulq_rs_w.c
tests/tcg/mips/mips32-dspr2/mulq_s_w.c

index 6781da8214c841da698309290acf73f641154035..841f47b91db9ac999cd9fa77a377a369a7e8303d 100644 (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;                                             \
                                                                \
index 669405faf1be0ea30a72eada1b5d41fc72fc258f..7ba633bc17f779b55460c3ded09b71b71923a562 100644 (file)
@@ -8,7 +8,7 @@ int main()
 
     rs = 0x80001234;
     rt = 0x80004321;
-    result = 0x80005555;
+    result = 0x7FFFAAAB;
 
     __asm
         ("mulq_rs.w %0, %1, %2\n\t"
index df148b7ffbf0a7cf241c4cdc1b80866058bf957d..9c2be06cc08afbd888890130ca5142f9e96af64e 100644 (file)
@@ -8,7 +8,7 @@ int main()
 
     rs = 0x80001234;
     rt = 0x80004321;
-    result = 0x80005555;
+    result = 0x7FFFAAAB;
 
     __asm
         ("mulq_s.w %0, %1, %2\n\t"
This page took 0.032269 seconds and 4 git commands to generate.