| 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/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/os.h" | 10 #include "vm/os.h" |
| (...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 EXPECT(test != NULL); | 1523 EXPECT(test != NULL); |
| 1524 typedef int (*Tst)(); | 1524 typedef int (*Tst)(); |
| 1525 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); | 1525 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); |
| 1526 } | 1526 } |
| 1527 | 1527 |
| 1528 | 1528 |
| 1529 ASSEMBLER_TEST_GENERATE(Sdiv_zero, assembler) { | 1529 ASSEMBLER_TEST_GENERATE(Sdiv_zero, assembler) { |
| 1530 if (TargetCPUFeatures::integer_division_supported()) { | 1530 if (TargetCPUFeatures::integer_division_supported()) { |
| 1531 __ mov(R0, ShifterOperand(27)); | 1531 __ mov(R0, ShifterOperand(27)); |
| 1532 __ mov(R1, ShifterOperand(0)); | 1532 __ mov(R1, ShifterOperand(0)); |
| 1533 __ udiv(R2, R0, R1); | 1533 __ sdiv(R2, R0, R1); |
| 1534 __ mov(R0, ShifterOperand(R2)); | 1534 __ mov(R0, ShifterOperand(R2)); |
| 1535 } else { | 1535 } else { |
| 1536 __ LoadImmediate(R0, 0); | 1536 __ LoadImmediate(R0, 0); |
| 1537 } | 1537 } |
| 1538 __ bx(LR); | 1538 __ bx(LR); |
| 1539 } | 1539 } |
| 1540 | 1540 |
| 1541 | 1541 |
| 1542 ASSEMBLER_TEST_RUN(Sdiv_zero, test) { | 1542 ASSEMBLER_TEST_RUN(Sdiv_zero, test) { |
| 1543 EXPECT(test != NULL); | 1543 EXPECT(test != NULL); |
| (...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3797 __ StoreIntoObject(R2, | 3797 __ StoreIntoObject(R2, |
| 3798 FieldAddress(R2, GrowableObjectArray::data_offset()), | 3798 FieldAddress(R2, GrowableObjectArray::data_offset()), |
| 3799 R1); | 3799 R1); |
| 3800 __ PopList((1 << CTX) | (1 << LR)); | 3800 __ PopList((1 << CTX) | (1 << LR)); |
| 3801 __ Ret(); | 3801 __ Ret(); |
| 3802 } | 3802 } |
| 3803 | 3803 |
| 3804 } // namespace dart | 3804 } // namespace dart |
| 3805 | 3805 |
| 3806 #endif // defined TARGET_ARCH_ARM | 3806 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |