| 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 __ ret(); | 385 __ ret(); |
| 386 } | 386 } |
| 387 | 387 |
| 388 | 388 |
| 389 ASSEMBLER_TEST_RUN(LoadStoreScaledReg, test) { | 389 ASSEMBLER_TEST_RUN(LoadStoreScaledReg, test) { |
| 390 typedef int (*SimpleCode)(); | 390 typedef int (*SimpleCode)(); |
| 391 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry())); | 391 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry())); |
| 392 } | 392 } |
| 393 | 393 |
| 394 | 394 |
| 395 ASSEMBLER_TEST_GENERATE(LoadSigned32Bit, assembler) { |
| 396 __ LoadImmediate(R1, 0xffffffff, kNoPP); |
| 397 __ str(R1, Address(SP, -4, Address::PreIndex, kWord), kWord); |
| 398 __ ldr(R0, Address(SP), kWord); |
| 399 __ ldr(R1, Address(SP, 4, Address::PostIndex, kWord), kWord); |
| 400 __ ret(); |
| 401 } |
| 402 |
| 403 |
| 404 ASSEMBLER_TEST_RUN(LoadSigned32Bit, test) { |
| 405 typedef int (*SimpleCode)(); |
| 406 EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry())); |
| 407 } |
| 408 |
| 409 |
| 395 // Logical register operations. | 410 // Logical register operations. |
| 396 ASSEMBLER_TEST_GENERATE(AndRegs, assembler) { | 411 ASSEMBLER_TEST_GENERATE(AndRegs, assembler) { |
| 397 __ movz(R1, 43, 0); | 412 __ movz(R1, 43, 0); |
| 398 __ movz(R2, 42, 0); | 413 __ movz(R2, 42, 0); |
| 399 __ and_(R0, R1, Operand(R2)); | 414 __ and_(R0, R1, Operand(R2)); |
| 400 __ ret(); | 415 __ ret(); |
| 401 } | 416 } |
| 402 | 417 |
| 403 | 418 |
| 404 ASSEMBLER_TEST_RUN(AndRegs, test) { | 419 ASSEMBLER_TEST_RUN(AndRegs, test) { |
| (...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1847 R1); | 1862 R1); |
| 1848 __ Pop(LR); | 1863 __ Pop(LR); |
| 1849 __ Pop(CTX); | 1864 __ Pop(CTX); |
| 1850 __ PopAndUntagPP(); | 1865 __ PopAndUntagPP(); |
| 1851 __ ret(); | 1866 __ ret(); |
| 1852 } | 1867 } |
| 1853 | 1868 |
| 1854 } // namespace dart | 1869 } // namespace dart |
| 1855 | 1870 |
| 1856 #endif // defined(TARGET_ARCH_ARM64) | 1871 #endif // defined(TARGET_ARCH_ARM64) |
| OLD | NEW |