| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2198 Register object = eax; // Object (lhs). | 2198 Register object = eax; // Object (lhs). |
| 2199 Register map = ebx; // Map of the object. | 2199 Register map = ebx; // Map of the object. |
| 2200 Register function = edx; // Function (rhs). | 2200 Register function = edx; // Function (rhs). |
| 2201 Register prototype = edi; // Prototype of the function. | 2201 Register prototype = edi; // Prototype of the function. |
| 2202 Register scratch = ecx; | 2202 Register scratch = ecx; |
| 2203 | 2203 |
| 2204 // Constants describing the call site code to patch. | 2204 // Constants describing the call site code to patch. |
| 2205 static const int kDeltaToCmpImmediate = 2; | 2205 static const int kDeltaToCmpImmediate = 2; |
| 2206 static const int kDeltaToMov = 8; | 2206 static const int kDeltaToMov = 8; |
| 2207 static const int kDeltaToMovImmediate = 9; | 2207 static const int kDeltaToMovImmediate = 9; |
| 2208 static const int8_t kCmpEdiOperandByte1 = BitCast<int8_t, uint8_t>(0x3b); | 2208 static const int8_t kCmpEdiOperandByte1 = bit_cast<int8_t, uint8_t>(0x3b); |
| 2209 static const int8_t kCmpEdiOperandByte2 = BitCast<int8_t, uint8_t>(0x3d); | 2209 static const int8_t kCmpEdiOperandByte2 = bit_cast<int8_t, uint8_t>(0x3d); |
| 2210 static const int8_t kMovEaxImmediateByte = BitCast<int8_t, uint8_t>(0xb8); | 2210 static const int8_t kMovEaxImmediateByte = bit_cast<int8_t, uint8_t>(0xb8); |
| 2211 | 2211 |
| 2212 DCHECK_EQ(object.code(), InstanceofStub::left().code()); | 2212 DCHECK_EQ(object.code(), InstanceofStub::left().code()); |
| 2213 DCHECK_EQ(function.code(), InstanceofStub::right().code()); | 2213 DCHECK_EQ(function.code(), InstanceofStub::right().code()); |
| 2214 | 2214 |
| 2215 // Get the object and function - they are always both needed. | 2215 // Get the object and function - they are always both needed. |
| 2216 Label slow, not_js_object; | 2216 Label slow, not_js_object; |
| 2217 if (!HasArgsInRegisters()) { | 2217 if (!HasArgsInRegisters()) { |
| 2218 __ mov(object, Operand(esp, 2 * kPointerSize)); | 2218 __ mov(object, Operand(esp, 2 * kPointerSize)); |
| 2219 __ mov(function, Operand(esp, 1 * kPointerSize)); | 2219 __ mov(function, Operand(esp, 1 * kPointerSize)); |
| 2220 } | 2220 } |
| (...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4323 Operand(ebp, 7 * kPointerSize), | 4323 Operand(ebp, 7 * kPointerSize), |
| 4324 NULL); | 4324 NULL); |
| 4325 } | 4325 } |
| 4326 | 4326 |
| 4327 | 4327 |
| 4328 #undef __ | 4328 #undef __ |
| 4329 | 4329 |
| 4330 } } // namespace v8::internal | 4330 } } // namespace v8::internal |
| 4331 | 4331 |
| 4332 #endif // V8_TARGET_ARCH_X87 | 4332 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |