| 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/os.h" | 9 #include "vm/os.h" |
| 10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
| (...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 } | 1319 } |
| 1320 | 1320 |
| 1321 | 1321 |
| 1322 ASSEMBLER_TEST_RUN(Adds_Inf, test) { | 1322 ASSEMBLER_TEST_RUN(Adds_Inf, test) { |
| 1323 typedef double (*SimpleCode)(); | 1323 typedef double (*SimpleCode)(); |
| 1324 EXPECT(test != NULL); | 1324 EXPECT(test != NULL); |
| 1325 float res = EXECUTE_TEST_CODE_FLOAT(SimpleCode, test->entry()); | 1325 float res = EXECUTE_TEST_CODE_FLOAT(SimpleCode, test->entry()); |
| 1326 EXPECT_EQ(isfinite(res), false); | 1326 EXPECT_EQ(isfinite(res), false); |
| 1327 } | 1327 } |
| 1328 | 1328 |
| 1329 |
| 1330 // Called from assembler_test.cc. |
| 1331 // RA: return address. |
| 1332 // A0: context. |
| 1333 // A1: value. |
| 1334 // A2: growable array. |
| 1335 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { |
| 1336 __ addiu(SP, SP, Immediate(-2 * kWordSize)); |
| 1337 __ sw(CTX, Address(SP, 1 * kWordSize)); |
| 1338 __ sw(RA, Address(SP, 0 * kWordSize)); |
| 1339 |
| 1340 __ mov(CTX, A0); |
| 1341 __ StoreIntoObject(A2, |
| 1342 FieldAddress(A2, GrowableObjectArray::data_offset()), |
| 1343 A1); |
| 1344 __ lw(RA, Address(SP, 0 * kWordSize)); |
| 1345 __ lw(CTX, Address(SP, 1 * kWordSize)); |
| 1346 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
| 1347 __ Ret(); |
| 1348 } |
| 1349 |
| 1329 } // namespace dart | 1350 } // namespace dart |
| 1330 | 1351 |
| 1331 #endif // defined TARGET_ARCH_MIPS | 1352 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |