提交 b09a6731 编写于 作者: P Petar Jovanovic 提交者: Michael Roth

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: NPetar Jovanovic <petarj@mips.com>
Richard Henderson <rth@twiddle.net>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
(cherry picked from commit a345481b)
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 79a4dd40
...@@ -2689,7 +2689,7 @@ MAQ_SA_W(maq_sa_w_phr, 0); ...@@ -2689,7 +2689,7 @@ MAQ_SA_W(maq_sa_w_phr, 0);
target_ulong helper_##name(target_ulong rs, target_ulong rt, \ target_ulong helper_##name(target_ulong rs, target_ulong rt, \
CPUMIPSState *env) \ CPUMIPSState *env) \
{ \ { \
uint32_t rs_t, rt_t; \ int32_t rs_t, rt_t; \
int32_t tempI; \ int32_t tempI; \
int64_t tempL; \ int64_t tempL; \
\ \
......
...@@ -8,7 +8,7 @@ int main() ...@@ -8,7 +8,7 @@ int main()
rs = 0x80001234; rs = 0x80001234;
rt = 0x80004321; rt = 0x80004321;
result = 0x80005555; result = 0x7FFFAAAB;
__asm __asm
("mulq_rs.w %0, %1, %2\n\t" ("mulq_rs.w %0, %1, %2\n\t"
......
...@@ -8,7 +8,7 @@ int main() ...@@ -8,7 +8,7 @@ int main()
rs = 0x80001234; rs = 0x80001234;
rt = 0x80004321; rt = 0x80004321;
result = 0x80005555; result = 0x7FFFAAAB;
__asm __asm
("mulq_s.w %0, %1, %2\n\t" ("mulq_s.w %0, %1, %2\n\t"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册