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

Unified Diff: src/ia32/macro-assembler-ia32.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/ia32/macro-assembler-ia32.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index f938d500182161151c5ebf633dc6f5a8315790aa..fb0acb29ad97ef3190a17e2d07d2a0c311e78b67 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -250,18 +250,17 @@ 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) {
DCHECK(!input_reg.is(scratch));
cvttsd2si(result_reg, Operand(input_reg));
Cvtsi2sd(scratch, Operand(result_reg));
ucomisd(scratch, 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);
if (minus_zero_mode == FAIL_ON_MINUS_ZERO) {
Label done;
// The integer converted back is equal to the original. We
@@ -271,9 +270,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.
and_(result_reg, 1);
- j(not_zero, conversion_failed, dst);
+ j(not_zero, minus_zero, dst);
bind(&done);
}
}
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698