X87: fixed branch distances.
port r24151. original commit message: Forgot a few kNear occurences, only happens with --deopt-every-n-times. Death to manual jump distance calculation! :-P BUG= R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/595263002 Patch from Chunyang Dai <chunyang.dai@intel.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
352733dca2
commit
8e6e09c169
@ -5302,9 +5302,10 @@ void LCodeGen::DoDoubleToI(LDoubleToI* instr) {
|
||||
Label lost_precision, is_nan, minus_zero, done;
|
||||
X87Register input_reg = ToX87Register(input);
|
||||
X87Fxch(input_reg);
|
||||
Label::Distance dist = DeoptEveryNTimes() ? Label::kFar : Label::kNear;
|
||||
__ X87TOSToI(result_reg, instr->hydrogen()->GetMinusZeroMode(),
|
||||
&lost_precision, &is_nan, &minus_zero, Label::kNear);
|
||||
__ jmp(&done, Label::kNear);
|
||||
&lost_precision, &is_nan, &minus_zero, dist);
|
||||
__ jmp(&done, dist);
|
||||
__ bind(&lost_precision);
|
||||
DeoptimizeIf(no_condition, instr, "lost precision");
|
||||
__ bind(&is_nan);
|
||||
@ -5326,10 +5327,10 @@ void LCodeGen::DoDoubleToSmi(LDoubleToSmi* instr) {
|
||||
Label lost_precision, is_nan, minus_zero, done;
|
||||
X87Register input_reg = ToX87Register(input);
|
||||
X87Fxch(input_reg);
|
||||
Label::Distance dist = DeoptEveryNTimes() ? Label::kFar : Label::kNear;
|
||||
__ X87TOSToI(result_reg, instr->hydrogen()->GetMinusZeroMode(),
|
||||
&lost_precision, &is_nan, &minus_zero,
|
||||
DeoptEveryNTimes() ? Label::kFar : Label::kNear);
|
||||
__ jmp(&done, Label::kNear);
|
||||
&lost_precision, &is_nan, &minus_zero, dist);
|
||||
__ jmp(&done, dist);
|
||||
__ bind(&lost_precision);
|
||||
DeoptimizeIf(no_condition, instr, "lost precision");
|
||||
__ bind(&is_nan);
|
||||
|
Loading…
Reference in New Issue
Block a user