X87: Made the detailed reason for deopts mandatory on x87. Unified and improved things.

port r24146.

original commit message:
   Made the detailed reason for deopts mandatory on ia32. Unified and improved things.

   The number of different detail strings has been reduced a bit without
   any loss of information. Furthermore, DoubleToI is a bit more
   informative now. Tiny reason fixes.

BUG=
R=weiliang.lin@intel.com

Review URL: https://codereview.chromium.org/597003003

Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24169 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7e21f858
This diff is collapsed.
...@@ -238,8 +238,7 @@ class LCodeGen: public LCodeGenBase { ...@@ -238,8 +238,7 @@ class LCodeGen: public LCodeGenBase {
Safepoint::DeoptMode mode); Safepoint::DeoptMode mode);
void DeoptimizeIf(Condition cc, LInstruction* instr, const char* detail, void DeoptimizeIf(Condition cc, LInstruction* instr, const char* detail,
Deoptimizer::BailoutType bailout_type); Deoptimizer::BailoutType bailout_type);
void DeoptimizeIf(Condition cc, LInstruction* instr, void DeoptimizeIf(Condition cc, LInstruction* instr, const char* detail);
const char* detail = NULL);
bool DeoptEveryNTimes() { bool DeoptEveryNTimes() {
return FLAG_deopt_every_n_times != 0 && !info()->IsStub(); return FLAG_deopt_every_n_times != 0 && !info()->IsStub();
......
...@@ -243,8 +243,8 @@ void MacroAssembler::TruncateX87TOSToI(Register result_reg) { ...@@ -243,8 +243,8 @@ void MacroAssembler::TruncateX87TOSToI(Register result_reg) {
void MacroAssembler::X87TOSToI(Register result_reg, void MacroAssembler::X87TOSToI(Register result_reg,
MinusZeroMode minus_zero_mode, MinusZeroMode minus_zero_mode,
Label* conversion_failed, Label* lost_precision, Label* is_nan,
Label::Distance dst) { Label* minus_zero, Label::Distance dst) {
Label done; Label done;
sub(esp, Immediate(kPointerSize)); sub(esp, Immediate(kPointerSize));
fld(0); fld(0);
...@@ -252,8 +252,8 @@ void MacroAssembler::X87TOSToI(Register result_reg, ...@@ -252,8 +252,8 @@ void MacroAssembler::X87TOSToI(Register result_reg,
fild_s(MemOperand(esp, 0)); fild_s(MemOperand(esp, 0));
pop(result_reg); pop(result_reg);
FCmp(); FCmp();
j(not_equal, conversion_failed, dst); j(not_equal, lost_precision, dst);
j(parity_even, conversion_failed, dst); j(parity_even, is_nan, dst);
if (minus_zero_mode == FAIL_ON_MINUS_ZERO) { if (minus_zero_mode == FAIL_ON_MINUS_ZERO) {
test(result_reg, Operand(result_reg)); test(result_reg, Operand(result_reg));
j(not_zero, &done, Label::kNear); j(not_zero, &done, Label::kNear);
...@@ -263,7 +263,7 @@ void MacroAssembler::X87TOSToI(Register result_reg, ...@@ -263,7 +263,7 @@ void MacroAssembler::X87TOSToI(Register result_reg,
fst_s(MemOperand(esp, 0)); fst_s(MemOperand(esp, 0));
pop(result_reg); pop(result_reg);
test(result_reg, Operand(result_reg)); test(result_reg, Operand(result_reg));
j(not_zero, conversion_failed, dst); j(not_zero, minus_zero, dst);
} }
bind(&done); bind(&done);
} }
......
...@@ -435,7 +435,8 @@ class MacroAssembler: public Assembler { ...@@ -435,7 +435,8 @@ class MacroAssembler: public Assembler {
void TruncateX87TOSToI(Register result_reg); void TruncateX87TOSToI(Register result_reg);
void X87TOSToI(Register result_reg, MinusZeroMode minus_zero_mode, void X87TOSToI(Register result_reg, MinusZeroMode minus_zero_mode,
Label* conversion_failed, Label::Distance dst = Label::kFar); Label* lost_precision, Label* is_nan, Label* minus_zero,
Label::Distance dst = Label::kFar);
// Smi tagging support. // Smi tagging support.
void SmiTag(Register reg) { void SmiTag(Register reg) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment