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

Unified Diff: src/x64/macro-assembler-x64.cc

Issue 591393002: Made the detailed reason for deopts mandatory on ia32. Unified and improved things. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 50ca8f2f51d49a21e60b191ce7e7851ff4929352..46fbd9c88f5a86dbd8bbbc795c63cac7710b970a 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -3517,17 +3517,16 @@ void MacroAssembler::TruncateDoubleToI(Register result_reg,
}
-void MacroAssembler::DoubleToI(Register result_reg,
- XMMRegister input_reg,
+void MacroAssembler::DoubleToI(Register result_reg, XMMRegister input_reg,
XMMRegister scratch,
MinusZeroMode minus_zero_mode,
- Label* conversion_failed,
- Label::Distance dst) {
+ Label* lost_precision, Label* is_nan,
+ Label* minus_zero, Label::Distance dst) {
cvttsd2si(result_reg, input_reg);
Cvtlsi2sd(xmm0, result_reg);
ucomisd(xmm0, input_reg);
- j(not_equal, conversion_failed, dst);
- j(parity_even, conversion_failed, dst); // NaN.
+ j(not_equal, lost_precision, dst);
+ j(parity_even, is_nan, dst); // NaN.
if (minus_zero_mode == FAIL_ON_MINUS_ZERO) {
Label done;
// The integer converted back is equal to the original. We
@@ -3537,9 +3536,9 @@ void MacroAssembler::DoubleToI(Register result_reg,
movmskpd(result_reg, input_reg);
// Bit 0 contains the sign of the double in input_reg.
// If input was positive, we are ok and return 0, otherwise
- // jump to conversion_failed.
+ // jump to minus_zero.
andl(result_reg, Immediate(1));
- j(not_zero, conversion_failed, dst);
+ j(not_zero, minus_zero, dst);
bind(&done);
}
}
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698