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_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
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 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 } | 1529 } |
1530 | 1530 |
1531 | 1531 |
1532 ASSEMBLER_TEST_RUN(Muls, test) { | 1532 ASSEMBLER_TEST_RUN(Muls, test) { |
1533 EXPECT(test != NULL); | 1533 EXPECT(test != NULL); |
1534 typedef int (*Tst)(); | 1534 typedef int (*Tst)(); |
1535 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); | 1535 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); |
1536 } | 1536 } |
1537 | 1537 |
1538 | 1538 |
| 1539 // Called from assembler_test.cc. |
| 1540 // LR: return address. |
| 1541 // R0: context. |
| 1542 // R1: value. |
| 1543 // R2: growable array. |
| 1544 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { |
| 1545 __ PushList((1 << CTX) | (1 << LR)); |
| 1546 __ mov(CTX, ShifterOperand(R0)); |
| 1547 __ StoreIntoObject(R2, |
| 1548 FieldAddress(R2, GrowableObjectArray::data_offset()), |
| 1549 R1); |
| 1550 __ PopList((1 << CTX) | (1 << LR)); |
| 1551 __ Ret(); |
| 1552 } |
| 1553 |
1539 } // namespace dart | 1554 } // namespace dart |
1540 | 1555 |
1541 #endif // defined TARGET_ARCH_ARM | 1556 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |