| 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 __ j(NOT_EQUAL, &error); | 543 __ j(NOT_EQUAL, &error); |
| 544 __ xorq(RCX, RCX); | 544 __ xorq(RCX, RCX); |
| 545 __ orq(RCX, Immediate(256)); | 545 __ orq(RCX, Immediate(256)); |
| 546 __ movq(RAX, Immediate(4)); | 546 __ movq(RAX, Immediate(4)); |
| 547 __ orq(RCX, RAX); | 547 __ orq(RCX, RAX); |
| 548 __ movq(RAX, Immediate(0xfff0)); | 548 __ movq(RAX, Immediate(0xfff0)); |
| 549 __ andq(RCX, RAX); | 549 __ andq(RCX, RAX); |
| 550 __ movq(RAX, Immediate(1)); | 550 __ movq(RAX, Immediate(1)); |
| 551 __ pushq(RAX); | 551 __ pushq(RAX); |
| 552 __ orq(RCX, Address(RSP, 0)); | 552 __ orq(RCX, Address(RSP, 0)); |
| 553 __ xorq(RCX, Immediate(0)); |
| 553 __ popq(RAX); | 554 __ popq(RAX); |
| 554 __ movq(RAX, RCX); | 555 __ movq(RAX, RCX); |
| 555 __ ret(); | 556 __ ret(); |
| 556 __ Bind(&error); | 557 __ Bind(&error); |
| 557 __ movq(RAX, Immediate(-1)); | 558 __ movq(RAX, Immediate(-1)); |
| 558 __ ret(); | 559 __ ret(); |
| 559 } | 560 } |
| 560 | 561 |
| 561 | 562 |
| 562 ASSEMBLER_TEST_RUN(Bitwise64, entry) { | 563 ASSEMBLER_TEST_RUN(Bitwise64, entry) { |
| (...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1706 EXPECT_EQ(0, res); | 1707 EXPECT_EQ(0, res); |
| 1707 res = reinterpret_cast<ExtractSignBits>(entry)(-1.0); | 1708 res = reinterpret_cast<ExtractSignBits>(entry)(-1.0); |
| 1708 EXPECT_EQ(1, res); | 1709 EXPECT_EQ(1, res); |
| 1709 res = reinterpret_cast<ExtractSignBits>(entry)(-0.0); | 1710 res = reinterpret_cast<ExtractSignBits>(entry)(-0.0); |
| 1710 EXPECT_EQ(1, res); | 1711 EXPECT_EQ(1, res); |
| 1711 } | 1712 } |
| 1712 | 1713 |
| 1713 } // namespace dart | 1714 } // namespace dart |
| 1714 | 1715 |
| 1715 #endif // defined TARGET_ARCH_X64 | 1716 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |