| 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_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/os.h" | 10 #include "vm/os.h" |
| (...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 __ ret(); | 1491 __ ret(); |
| 1492 } | 1492 } |
| 1493 | 1493 |
| 1494 | 1494 |
| 1495 ASSEMBLER_TEST_RUN(CsincTrue, test) { | 1495 ASSEMBLER_TEST_RUN(CsincTrue, test) { |
| 1496 typedef int (*SimpleCode)(); | 1496 typedef int (*SimpleCode)(); |
| 1497 EXPECT_EQ(1234, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry())); | 1497 EXPECT_EQ(1234, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry())); |
| 1498 } | 1498 } |
| 1499 | 1499 |
| 1500 | 1500 |
| 1501 ASSEMBLER_TEST_GENERATE(CsinvFalse, assembler) { |
| 1502 __ LoadImmediate(R1, 42, kNoRegister); |
| 1503 __ LoadImmediate(R2, 1234, kNoRegister); |
| 1504 __ CompareRegisters(R1, R2); |
| 1505 __ csinv(R0, R2, R1, GE); |
| 1506 __ ret(); |
| 1507 } |
| 1508 |
| 1509 |
| 1510 ASSEMBLER_TEST_RUN(CsinvFalse, test) { |
| 1511 typedef int (*SimpleCode)(); |
| 1512 EXPECT_EQ(~42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry())); |
| 1513 } |
| 1514 |
| 1515 |
| 1516 ASSEMBLER_TEST_GENERATE(CsinvTrue, assembler) { |
| 1517 __ LoadImmediate(R1, 42, kNoRegister); |
| 1518 __ LoadImmediate(R2, 1234, kNoRegister); |
| 1519 __ CompareRegisters(R1, R2); |
| 1520 __ csinv(R0, R2, R1, LT); |
| 1521 __ ret(); |
| 1522 } |
| 1523 |
| 1524 |
| 1525 ASSEMBLER_TEST_RUN(CsinvTrue, test) { |
| 1526 typedef int (*SimpleCode)(); |
| 1527 EXPECT_EQ(1234, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry())); |
| 1528 } |
| 1529 |
| 1530 |
| 1501 // Floating point move immediate, to/from integer register. | 1531 // Floating point move immediate, to/from integer register. |
| 1502 ASSEMBLER_TEST_GENERATE(Fmovdi, assembler) { | 1532 ASSEMBLER_TEST_GENERATE(Fmovdi, assembler) { |
| 1503 __ LoadDImmediate(V0, 1.0, kNoPP); | 1533 __ LoadDImmediate(V0, 1.0, kNoPP); |
| 1504 __ ret(); | 1534 __ ret(); |
| 1505 } | 1535 } |
| 1506 | 1536 |
| 1507 | 1537 |
| 1508 ASSEMBLER_TEST_RUN(Fmovdi, test) { | 1538 ASSEMBLER_TEST_RUN(Fmovdi, test) { |
| 1509 typedef int (*SimpleCode)(); | 1539 typedef int (*SimpleCode)(); |
| 1510 EXPECT_EQ(1.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); | 1540 EXPECT_EQ(1.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| (...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3187 R1); | 3217 R1); |
| 3188 __ Pop(LR); | 3218 __ Pop(LR); |
| 3189 __ Pop(CTX); | 3219 __ Pop(CTX); |
| 3190 __ PopAndUntagPP(); | 3220 __ PopAndUntagPP(); |
| 3191 __ ret(); | 3221 __ ret(); |
| 3192 } | 3222 } |
| 3193 | 3223 |
| 3194 } // namespace dart | 3224 } // namespace dart |
| 3195 | 3225 |
| 3196 #endif // defined(TARGET_ARCH_ARM64) | 3226 #endif // defined(TARGET_ARCH_ARM64) |
| OLD | NEW |