From: chunyang.dai Date: Tue, 14 Apr 2015 02:09:16 +0000 (-0700) Subject: X87: Change near jump to far jump to fix the jump distance check error. X-Git-Tag: upstream/4.7.83~3239 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc6e6234254e8ea44087502ac5742ad0c1d55bcf;p=platform%2Fupstream%2Fv8.git X87: Change near jump to far jump to fix the jump distance check error. The assembler code generated by the DeoptimizeIf(...) function under X87 is larger and the distance between the link point and the bind point which has two DeoptimizeIf() is larger then near link distance (127) for labels. BUG= Review URL: https://codereview.chromium.org/1065893003 Cr-Commit-Position: refs/heads/master@{#27801} --- diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc index 221c38812..0c38bc236 100644 --- a/src/x87/lithium-codegen-x87.cc +++ b/src/x87/lithium-codegen-x87.cc @@ -3572,7 +3572,6 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) { // object as a receiver to normal functions. Values have to be // passed unchanged to builtins and strict-mode functions. Label receiver_ok, global_object; - Label::Distance dist = DeoptEveryNTimes() ? Label::kFar : Label::kNear; Register scratch = ToRegister(instr->temp()); if (!instr->hydrogen()->known_function()) { @@ -3582,19 +3581,19 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) { FieldOperand(function, JSFunction::kSharedFunctionInfoOffset)); __ test_b(FieldOperand(scratch, SharedFunctionInfo::kStrictModeByteOffset), 1 << SharedFunctionInfo::kStrictModeBitWithinByte); - __ j(not_equal, &receiver_ok, dist); + __ j(not_equal, &receiver_ok); // Do not transform the receiver to object for builtins. __ test_b(FieldOperand(scratch, SharedFunctionInfo::kNativeByteOffset), 1 << SharedFunctionInfo::kNativeBitWithinByte); - __ j(not_equal, &receiver_ok, dist); + __ j(not_equal, &receiver_ok); } // Normal function. Replace undefined or null with global receiver. __ cmp(receiver, factory()->null_value()); - __ j(equal, &global_object, Label::kNear); + __ j(equal, &global_object); __ cmp(receiver, factory()->undefined_value()); - __ j(equal, &global_object, Label::kNear); + __ j(equal, &global_object); // The receiver should be a JS object. __ test(receiver, Immediate(kSmiTagMask));