| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2147 const Register left = RAX; | 2147 const Register left = RAX; |
| 2148 const Register right = RDX; | 2148 const Register right = RDX; |
| 2149 | 2149 |
| 2150 __ movq(left, Address(RSP, 2 * kWordSize)); | 2150 __ movq(left, Address(RSP, 2 * kWordSize)); |
| 2151 __ movq(right, Address(RSP, 1 * kWordSize)); | 2151 __ movq(right, Address(RSP, 1 * kWordSize)); |
| 2152 GenerateIdenticalWithNumberCheckStub(assembler, left, right); | 2152 GenerateIdenticalWithNumberCheckStub(assembler, left, right); |
| 2153 __ ret(); | 2153 __ ret(); |
| 2154 } | 2154 } |
| 2155 | 2155 |
| 2156 | 2156 |
| 2157 // Called from otpimzied code only. Must preserve any registers that are | 2157 // Called from optimized code only. |
| 2158 // destroyed. | |
| 2159 // TOS + 0: return address | 2158 // TOS + 0: return address |
| 2160 // TOS + 1: right argument. | 2159 // TOS + 1: right argument. |
| 2161 // TOS + 2: left argument. | 2160 // TOS + 2: left argument. |
| 2162 // Returns ZF set. | 2161 // Returns ZF set. |
| 2163 void StubCode::GenerateOptimizedIdenticalWithNumberCheckStub( | 2162 void StubCode::GenerateOptimizedIdenticalWithNumberCheckStub( |
| 2164 Assembler* assembler) { | 2163 Assembler* assembler) { |
| 2165 const Register left = RAX; | 2164 const Register left = RAX; |
| 2166 const Register right = RDX; | 2165 const Register right = RDX; |
| 2167 // Preserve left and right. | 2166 |
| 2168 __ pushq(left); | 2167 __ movq(left, Address(RSP, 2 * kWordSize)); |
| 2169 __ pushq(right); | 2168 __ movq(right, Address(RSP, 1 * kWordSize)); |
| 2170 __ movq(left, Address(RSP, 4 * kWordSize)); | |
| 2171 __ movq(right, Address(RSP, 3 * kWordSize)); | |
| 2172 GenerateIdenticalWithNumberCheckStub(assembler, left, right); | 2169 GenerateIdenticalWithNumberCheckStub(assembler, left, right); |
| 2173 __ popq(right); | |
| 2174 __ popq(left); | |
| 2175 __ ret(); | 2170 __ ret(); |
| 2176 } | 2171 } |
| 2177 | 2172 |
| 2178 } // namespace dart | 2173 } // namespace dart |
| 2179 | 2174 |
| 2180 #endif // defined TARGET_ARCH_X64 | 2175 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |