| 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 2065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2076 ASSEMBLER_TEST_RUN(Cop1CvtSD, test) { | 2076 ASSEMBLER_TEST_RUN(Cop1CvtSD, test) { |
| 2077 typedef double (*SimpleCode)() DART_UNUSED; | 2077 typedef double (*SimpleCode)() DART_UNUSED; |
| 2078 EXPECT(test != NULL); | 2078 EXPECT(test != NULL); |
| 2079 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()); | 2079 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()); |
| 2080 EXPECT_FLOAT_EQ(-42.42, res, 0.001); | 2080 EXPECT_FLOAT_EQ(-42.42, res, 0.001); |
| 2081 } | 2081 } |
| 2082 | 2082 |
| 2083 | 2083 |
| 2084 // Called from assembler_test.cc. | 2084 // Called from assembler_test.cc. |
| 2085 // RA: return address. | 2085 // RA: return address. |
| 2086 // A0: context. | 2086 // A0: value. |
| 2087 // A1: value. | 2087 // A1: growable array. |
| 2088 // A2: growable array. | 2088 // A2: current thread. |
| 2089 // A3: current thread. | |
| 2090 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { | 2089 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { |
| 2091 __ addiu(SP, SP, Immediate(-3 * kWordSize)); | 2090 __ addiu(SP, SP, Immediate(-2 * kWordSize)); |
| 2092 __ sw(THR, Address(SP, 2 * kWordSize)); | 2091 __ sw(THR, Address(SP, 1 * kWordSize)); |
| 2093 __ sw(CTX, Address(SP, 1 * kWordSize)); | |
| 2094 __ sw(RA, Address(SP, 0 * kWordSize)); | 2092 __ sw(RA, Address(SP, 0 * kWordSize)); |
| 2095 __ mov(CTX, A0); | 2093 __ mov(THR, A2); |
| 2096 __ mov(THR, A3); | 2094 __ StoreIntoObject(A1, |
| 2097 __ StoreIntoObject(A2, | 2095 FieldAddress(A1, GrowableObjectArray::data_offset()), |
| 2098 FieldAddress(A2, GrowableObjectArray::data_offset()), | 2096 A0); |
| 2099 A1); | |
| 2100 __ lw(RA, Address(SP, 0 * kWordSize)); | 2097 __ lw(RA, Address(SP, 0 * kWordSize)); |
| 2101 __ lw(CTX, Address(SP, 1 * kWordSize)); | 2098 __ lw(THR, Address(SP, 1 * kWordSize)); |
| 2102 __ lw(THR, Address(SP, 2 * kWordSize)); | 2099 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
| 2103 __ addiu(SP, SP, Immediate(3 * kWordSize)); | |
| 2104 __ Ret(); | 2100 __ Ret(); |
| 2105 } | 2101 } |
| 2106 | 2102 |
| 2107 | 2103 |
| 2108 ASSEMBLER_TEST_GENERATE(ComputeRange, assembler) { | 2104 ASSEMBLER_TEST_GENERATE(ComputeRange, assembler) { |
| 2109 Label miss, done; | 2105 Label miss, done; |
| 2110 __ ComputeRange(V0, A0, &miss); | 2106 __ ComputeRange(V0, A0, &miss); |
| 2111 __ b(&done); | 2107 __ b(&done); |
| 2112 | 2108 |
| 2113 __ Bind(&miss); | 2109 __ Bind(&miss); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2152 | 2148 |
| 2153 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw())); | 2149 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw())); |
| 2154 | 2150 |
| 2155 #undef RANGE_OF | 2151 #undef RANGE_OF |
| 2156 } | 2152 } |
| 2157 | 2153 |
| 2158 | 2154 |
| 2159 } // namespace dart | 2155 } // namespace dart |
| 2160 | 2156 |
| 2161 #endif // defined TARGET_ARCH_MIPS | 2157 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |