Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(853)

Unified Diff: src/crankshaft/x87/lithium-codegen-x87.cc

Issue 2175243002: [X87] [crankshaft] Fix Math.max(-0, 0) bug. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updated the bug description according to Jakob's comment Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x87/lithium-codegen-x87.cc
diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc
index 2648681b42e0c8bf21c67f958101aa1451e47044..a51c33f0f1cc44ea529e8af65c1db366557d27ca 100644
--- a/src/crankshaft/x87/lithium-codegen-x87.cc
+++ b/src/crankshaft/x87/lithium-codegen-x87.cc
@@ -1969,8 +1969,8 @@ void LCodeGen::DoMathMinMax(LMathMinMax* instr) {
__ pop(scratch_reg); // restore esp
} else {
// Since we operate on +0 and/or -0, addsd and andsd have the same effect.
- X87Fxch(left_reg);
- __ fadd(1);
+ // Should put the result in stX0
+ __ fadd_i(1);
}
__ jmp(&return_left, Label::kNear);
@@ -1981,7 +1981,6 @@ void LCodeGen::DoMathMinMax(LMathMinMax* instr) {
__ j(parity_even, &return_left, Label::kNear); // left == NaN.
__ bind(&return_right);
- X87Fxch(left_reg);
X87Mov(left_reg, right_reg);
__ bind(&return_left);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698