| 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_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 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 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1633 | 1633 |
| 1634 ASSEMBLER_TEST_RUN(Movd, test) { | 1634 ASSEMBLER_TEST_RUN(Movd, test) { |
| 1635 typedef double (*SimpleCode)() DART_UNUSED; | 1635 typedef double (*SimpleCode)() DART_UNUSED; |
| 1636 EXPECT(test != NULL); | 1636 EXPECT(test != NULL); |
| 1637 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()); | 1637 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()); |
| 1638 EXPECT_FLOAT_EQ(1.0, res, 0.001); | 1638 EXPECT_FLOAT_EQ(1.0, res, 0.001); |
| 1639 } | 1639 } |
| 1640 | 1640 |
| 1641 | 1641 |
| 1642 ASSEMBLER_TEST_GENERATE(Sdc1Ldc1, assembler) { | 1642 ASSEMBLER_TEST_GENERATE(Sdc1Ldc1, assembler) { |
| 1643 __ AddImmediate(SP, -8 * kWordSize); | 1643 __ mov(T0, SP); |
| 1644 __ LoadImmediate(T1, ~(8 - 1)); | 1644 __ AddImmediate(SP, -3 * kWordSize); |
| 1645 __ and_(T0, SP, T1); // Need 8 byte alignment. | 1645 __ AndImmediate(SP, SP, ~(8 - 1)); // Align SP by 8 bytes. |
| 1646 __ LoadImmediate(D1, 1.0); | 1646 __ LoadImmediate(D1, 1.0); |
| 1647 __ sdc1(D1, Address(T0)); | 1647 __ sdc1(D1, Address(SP)); |
| 1648 __ ldc1(D0, Address(T0)); | 1648 __ ldc1(D0, Address(SP)); |
| 1649 __ mov(SP, T0); |
| 1649 __ Ret(); | 1650 __ Ret(); |
| 1650 } | 1651 } |
| 1651 | 1652 |
| 1652 | 1653 |
| 1653 ASSEMBLER_TEST_RUN(Sdc1Ldc1, test) { | 1654 ASSEMBLER_TEST_RUN(Sdc1Ldc1, test) { |
| 1654 typedef double (*SimpleCode)() DART_UNUSED; | 1655 typedef double (*SimpleCode)() DART_UNUSED; |
| 1655 EXPECT(test != NULL); | 1656 EXPECT(test != NULL); |
| 1656 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()); | 1657 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()); |
| 1657 EXPECT_FLOAT_EQ(1.0, res, 0.001); | 1658 EXPECT_FLOAT_EQ(1.0, res, 0.001); |
| 1658 } | 1659 } |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2148 | 2149 |
| 2149 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw())); | 2150 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw())); |
| 2150 | 2151 |
| 2151 #undef RANGE_OF | 2152 #undef RANGE_OF |
| 2152 } | 2153 } |
| 2153 | 2154 |
| 2154 | 2155 |
| 2155 } // namespace dart | 2156 } // namespace dart |
| 2156 | 2157 |
| 2157 #endif // defined TARGET_ARCH_MIPS | 2158 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |