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
This commit is contained in:
palfia@homejinni.com 2013-06-10 21:54:07 +00:00
parent 88021e64b1
commit 1d4c64591b

View File

@ -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);