OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/os.h" | 9 #include "vm/os.h" |
10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2210 __ StoreObject(Address(RSP, 0), obj, PP); | 2210 __ StoreObject(Address(RSP, 0), obj, PP); |
2211 __ popq(RCX); | 2211 __ popq(RCX); |
2212 __ CompareObject(RCX, obj, PP); | 2212 __ CompareObject(RCX, obj, PP); |
2213 __ j(NOT_EQUAL, &fail); | 2213 __ j(NOT_EQUAL, &fail); |
2214 __ pushq(RAX); | 2214 __ pushq(RAX); |
2215 __ StoreObject(Address(RSP, 0), smi, PP); | 2215 __ StoreObject(Address(RSP, 0), smi, PP); |
2216 __ popq(RCX); | 2216 __ popq(RCX); |
2217 __ CompareObject(RCX, smi, PP); | 2217 __ CompareObject(RCX, smi, PP); |
2218 __ j(NOT_EQUAL, &fail); | 2218 __ j(NOT_EQUAL, &fail); |
2219 __ movl(RAX, Immediate(1)); // OK | 2219 __ movl(RAX, Immediate(1)); // OK |
| 2220 __ popq(PP); // Restore caller's pool pointer. |
2220 __ LeaveFrame(); | 2221 __ LeaveFrame(); |
2221 __ ret(); | 2222 __ ret(); |
2222 __ Bind(&fail); | 2223 __ Bind(&fail); |
2223 __ movl(RAX, Immediate(0)); // Fail. | 2224 __ movl(RAX, Immediate(0)); // Fail. |
2224 __ popq(PP); // Restore caller's pool pointer. | 2225 __ popq(PP); // Restore caller's pool pointer. |
2225 __ LeaveFrame(); | 2226 __ LeaveFrame(); |
2226 __ ret(); | 2227 __ ret(); |
2227 } | 2228 } |
2228 | 2229 |
2229 | 2230 |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2655 EXPECT_EQ(1, res); // Greater equal. | 2656 EXPECT_EQ(1, res); // Greater equal. |
2656 res = reinterpret_cast<ConditionalMovesCompareCode>(test->entry())(5, 5); | 2657 res = reinterpret_cast<ConditionalMovesCompareCode>(test->entry())(5, 5); |
2657 EXPECT_EQ(1, res); // Greater equal. | 2658 EXPECT_EQ(1, res); // Greater equal. |
2658 res = reinterpret_cast<ConditionalMovesCompareCode>(test->entry())(2, 5); | 2659 res = reinterpret_cast<ConditionalMovesCompareCode>(test->entry())(2, 5); |
2659 EXPECT_EQ(-1, res); // Less. | 2660 EXPECT_EQ(-1, res); // Less. |
2660 } | 2661 } |
2661 | 2662 |
2662 } // namespace dart | 2663 } // namespace dart |
2663 | 2664 |
2664 #endif // defined TARGET_ARCH_X64 | 2665 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |