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 3535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3546 double res = EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()); | 3546 double res = EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()); |
3547 EXPECT_FLOAT_EQ(1.0/sqrt(147000.0), res, 0.0001); | 3547 EXPECT_FLOAT_EQ(1.0/sqrt(147000.0), res, 0.0001); |
3548 } | 3548 } |
3549 | 3549 |
3550 | 3550 |
3551 // Called from assembler_test.cc. | 3551 // Called from assembler_test.cc. |
3552 // LR: return address. | 3552 // LR: return address. |
3553 // R0: context. | 3553 // R0: context. |
3554 // R1: value. | 3554 // R1: value. |
3555 // R2: growable array. | 3555 // R2: growable array. |
| 3556 // R3: current thread. |
3556 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { | 3557 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { |
3557 __ SetupDartSP(kTestStackSpace); | 3558 __ SetupDartSP(kTestStackSpace); |
3558 __ TagAndPushPP(); | 3559 __ TagAndPushPP(); |
3559 __ LoadPoolPointer(PP); | 3560 __ LoadPoolPointer(PP); |
| 3561 __ Push(THR); |
3560 __ Push(CTX); | 3562 __ Push(CTX); |
3561 __ Push(LR); | 3563 __ Push(LR); |
3562 __ mov(CTX, R0); | 3564 __ mov(CTX, R0); |
| 3565 __ mov(THR, R3); |
3563 __ StoreIntoObject(R2, | 3566 __ StoreIntoObject(R2, |
3564 FieldAddress(R2, GrowableObjectArray::data_offset()), | 3567 FieldAddress(R2, GrowableObjectArray::data_offset()), |
3565 R1); | 3568 R1); |
3566 __ Pop(LR); | 3569 __ Pop(LR); |
3567 __ Pop(CTX); | 3570 __ Pop(CTX); |
| 3571 __ Pop(THR); |
3568 __ PopAndUntagPP(); | 3572 __ PopAndUntagPP(); |
3569 __ mov(CSP, SP); | 3573 __ mov(CSP, SP); |
3570 __ ret(); | 3574 __ ret(); |
3571 } | 3575 } |
3572 | 3576 |
3573 | 3577 |
3574 ASSEMBLER_TEST_GENERATE(ComputeRange, assembler) { | 3578 ASSEMBLER_TEST_GENERATE(ComputeRange, assembler) { |
3575 __ SetupDartSP(kTestStackSpace); | 3579 __ SetupDartSP(kTestStackSpace); |
3576 __ TagAndPushPP(); | 3580 __ TagAndPushPP(); |
3577 __ LoadPoolPointer(PP); | 3581 __ LoadPoolPointer(PP); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3627 | 3631 |
3628 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw())); | 3632 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw())); |
3629 | 3633 |
3630 #undef RANGE_OF | 3634 #undef RANGE_OF |
3631 } | 3635 } |
3632 | 3636 |
3633 | 3637 |
3634 } // namespace dart | 3638 } // namespace dart |
3635 | 3639 |
3636 #endif // defined(TARGET_ARCH_ARM64) | 3640 #endif // defined(TARGET_ARCH_ARM64) |
OLD | NEW |