| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 | 1099 |
| 1100 __ bind(&return_equal); | 1100 __ bind(&return_equal); |
| 1101 __ Set(rax, EQUAL); | 1101 __ Set(rax, EQUAL); |
| 1102 __ ret(0); | 1102 __ ret(0); |
| 1103 } | 1103 } |
| 1104 __ bind(&runtime_call); | 1104 __ bind(&runtime_call); |
| 1105 | 1105 |
| 1106 if (cc == equal) { | 1106 if (cc == equal) { |
| 1107 { | 1107 { |
| 1108 FrameScope scope(masm, StackFrame::INTERNAL); | 1108 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1109 __ Push(rdx); | 1109 __ Push(rsi); |
| 1110 __ Push(rax); | 1110 __ Call(strict() ? isolate()->builtins()->StrictEqual() |
| 1111 __ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual); | 1111 : isolate()->builtins()->Equal(), |
| 1112 RelocInfo::CODE_TARGET); |
| 1113 __ Pop(rsi); |
| 1112 } | 1114 } |
| 1113 // Turn true into 0 and false into some non-zero value. | 1115 // Turn true into 0 and false into some non-zero value. |
| 1114 STATIC_ASSERT(EQUAL == 0); | 1116 STATIC_ASSERT(EQUAL == 0); |
| 1115 __ LoadRoot(rdx, Heap::kTrueValueRootIndex); | 1117 __ LoadRoot(rdx, Heap::kTrueValueRootIndex); |
| 1116 __ subp(rax, rdx); | 1118 __ subp(rax, rdx); |
| 1117 __ Ret(); | 1119 __ Ret(); |
| 1118 } else { | 1120 } else { |
| 1119 // Push arguments below the return address to prepare jump to builtin. | 1121 // Push arguments below the return address to prepare jump to builtin. |
| 1120 __ PopReturnAddressTo(rcx); | 1122 __ PopReturnAddressTo(rcx); |
| 1121 __ Push(rdx); | 1123 __ Push(rdx); |
| (...skipping 3055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4177 kStackUnwindSpace, nullptr, return_value_operand, | 4179 kStackUnwindSpace, nullptr, return_value_operand, |
| 4178 NULL); | 4180 NULL); |
| 4179 } | 4181 } |
| 4180 | 4182 |
| 4181 #undef __ | 4183 #undef __ |
| 4182 | 4184 |
| 4183 } // namespace internal | 4185 } // namespace internal |
| 4184 } // namespace v8 | 4186 } // namespace v8 |
| 4185 | 4187 |
| 4186 #endif // V8_TARGET_ARCH_X64 | 4188 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |