Reviewers: Paul Lind, danno, kisg, kilvadyb,
Description:
MIPS: Fix abs_d instruction in the simulator.
The abs_d instruction was implemented wrongly in the simulator,
it doesn't reverse the sign of the -0 number.
This commit fixes the abs_d instruction implementation.
TEST=msjunit/math-abs
BUG=
Please review this at https://codereview.chromium.org/15906014/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/mips/simulator-mips.cc
Index: src/mips/simulator-mips.cc
diff --git a/src/mips/simulator-mips.cc b/src/mips/simulator-mips.cc
index
baf042c3b2191d0db70fd7e22b25228ff120f26f..d8a39ab30c764701e2d481f62c9affd3cd601f07
100644
--- a/src/mips/simulator-mips.cc
+++ b/src/mips/simulator-mips.cc
@@ -2091,7 +2091,7 @@ void Simulator::DecodeTypeRegister(Instruction*
instr) {
set_fpu_register_double(fd_reg, fs / ft);
break;
case ABS_D:
- set_fpu_register_double(fd_reg, fs < 0 ? -fs : fs);
+ set_fpu_register_double(fd_reg, fabs(fs));
break;
case MOV_D:
set_fpu_register_double(fd_reg, fs);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.