Commit 1d4c6459 authored by palfia@homejinni.com's avatar palfia@homejinni.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 88021e64
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment