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:
parent
88021e64b1
commit
1d4c64591b
@ -2091,7 +2091,7 @@ void Simulator::DecodeTypeRegister(Instruction* instr) {
|
|||||||
set_fpu_register_double(fd_reg, fs / ft);
|
set_fpu_register_double(fd_reg, fs / ft);
|
||||||
break;
|
break;
|
||||||
case ABS_D:
|
case ABS_D:
|
||||||
set_fpu_register_double(fd_reg, fs < 0 ? -fs : fs);
|
set_fpu_register_double(fd_reg, fabs(fs));
|
||||||
break;
|
break;
|
||||||
case MOV_D:
|
case MOV_D:
|
||||||
set_fpu_register_double(fd_reg, fs);
|
set_fpu_register_double(fd_reg, fs);
|
||||||
|
Loading…
Reference in New Issue
Block a user