Revision: 15053
Author:   [email protected]
Date:     Mon Jun 10 14:54:07 2013
Log:      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=

Review URL: https://codereview.chromium.org/15906014
http://code.google.com/p/v8/source/detail?r=15053

Modified:
 /branches/bleeding_edge/src/mips/simulator-mips.cc

=======================================
--- /branches/bleeding_edge/src/mips/simulator-mips.cc Sat May 25 10:10:42 2013 +++ /branches/bleeding_edge/src/mips/simulator-mips.cc Mon Jun 10 14:54:07 2013
@@ -2091,7 +2091,7 @@
               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.


Reply via email to