| 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 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2631 } | 2631 } |
| 2632 | 2632 |
| 2633 | 2633 |
| 2634 ASSEMBLER_TEST_RUN(Vdupw, test) { | 2634 ASSEMBLER_TEST_RUN(Vdupw, test) { |
| 2635 EXPECT(test != NULL); | 2635 EXPECT(test != NULL); |
| 2636 typedef int (*Tst)(); | 2636 typedef int (*Tst)(); |
| 2637 EXPECT_EQ(-4, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); | 2637 EXPECT_EQ(-4, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); |
| 2638 } | 2638 } |
| 2639 | 2639 |
| 2640 | 2640 |
| 2641 ASSEMBLER_TEST_GENERATE(Vzipqw, assembler) { |
| 2642 if (CPUFeatures::neon_supported()) { |
| 2643 __ LoadSImmediate(S0, 0.0); |
| 2644 __ LoadSImmediate(S1, 1.0); |
| 2645 __ LoadSImmediate(S2, 2.0); |
| 2646 __ LoadSImmediate(S3, 3.0); |
| 2647 __ LoadSImmediate(S4, 4.0); |
| 2648 __ LoadSImmediate(S5, 5.0); |
| 2649 __ LoadSImmediate(S6, 6.0); |
| 2650 __ LoadSImmediate(S7, 7.0); |
| 2651 |
| 2652 __ vzipqw(Q0, Q1); |
| 2653 |
| 2654 __ vsubqs(Q0, Q1, Q0); |
| 2655 |
| 2656 __ vadds(S0, S0, S1); |
| 2657 __ vadds(S0, S0, S2); |
| 2658 __ vadds(S0, S0, S3); |
| 2659 __ bx(LR); |
| 2660 } else { |
| 2661 __ LoadSImmediate(S0, 8.0); |
| 2662 __ bx(LR); |
| 2663 } |
| 2664 } |
| 2665 |
| 2666 |
| 2667 ASSEMBLER_TEST_RUN(Vzipqw, test) { |
| 2668 EXPECT(test != NULL); |
| 2669 typedef float (*Vzipqw)(); |
| 2670 float res = EXECUTE_TEST_CODE_FLOAT(Vzipqw, test->entry()); |
| 2671 EXPECT_FLOAT_EQ(8.0, res, 0.0001f); |
| 2672 } |
| 2673 |
| 2674 |
| 2641 ASSEMBLER_TEST_GENERATE(Vceqqi32, assembler) { | 2675 ASSEMBLER_TEST_GENERATE(Vceqqi32, assembler) { |
| 2642 if (CPUFeatures::neon_supported()) { | 2676 if (CPUFeatures::neon_supported()) { |
| 2643 __ mov(R0, ShifterOperand(1)); | 2677 __ mov(R0, ShifterOperand(1)); |
| 2644 __ vmovsr(S0, R0); | 2678 __ vmovsr(S0, R0); |
| 2645 __ mov(R0, ShifterOperand(2)); | 2679 __ mov(R0, ShifterOperand(2)); |
| 2646 __ vmovsr(S1, R0); | 2680 __ vmovsr(S1, R0); |
| 2647 __ mov(R0, ShifterOperand(3)); | 2681 __ mov(R0, ShifterOperand(3)); |
| 2648 __ vmovsr(S2, R0); | 2682 __ vmovsr(S2, R0); |
| 2649 __ mov(R0, ShifterOperand(4)); | 2683 __ mov(R0, ShifterOperand(4)); |
| 2650 __ vmovsr(S3, R0); | 2684 __ vmovsr(S3, R0); |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3502 __ StoreIntoObject(R2, | 3536 __ StoreIntoObject(R2, |
| 3503 FieldAddress(R2, GrowableObjectArray::data_offset()), | 3537 FieldAddress(R2, GrowableObjectArray::data_offset()), |
| 3504 R1); | 3538 R1); |
| 3505 __ PopList((1 << CTX) | (1 << LR)); | 3539 __ PopList((1 << CTX) | (1 << LR)); |
| 3506 __ Ret(); | 3540 __ Ret(); |
| 3507 } | 3541 } |
| 3508 | 3542 |
| 3509 } // namespace dart | 3543 } // namespace dart |
| 3510 | 3544 |
| 3511 #endif // defined TARGET_ARCH_ARM | 3545 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |