Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: runtime/vm/assembler_mips_test.cc

Issue 1192103004: VM: New calling convention for generated code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed comments Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/assembler_mips.cc ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after
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: value. 2086 // A0: value.
2087 // A1: growable array. 2087 // A1: growable array.
2088 // A2: current thread. 2088 // A2: current thread.
2089 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { 2089 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) {
2090 __ addiu(SP, SP, Immediate(-2 * kWordSize)); 2090 __ addiu(SP, SP, Immediate(-3 * kWordSize));
2091 __ sw(CODE_REG, Address(SP, 2 * kWordSize));
2091 __ sw(THR, Address(SP, 1 * kWordSize)); 2092 __ sw(THR, Address(SP, 1 * kWordSize));
2092 __ sw(RA, Address(SP, 0 * kWordSize)); 2093 __ sw(RA, Address(SP, 0 * kWordSize));
2093 __ mov(THR, A2); 2094 __ mov(THR, A2);
2094 __ StoreIntoObject(A1, 2095 __ StoreIntoObject(A1,
2095 FieldAddress(A1, GrowableObjectArray::data_offset()), 2096 FieldAddress(A1, GrowableObjectArray::data_offset()),
2096 A0); 2097 A0);
2097 __ lw(RA, Address(SP, 0 * kWordSize)); 2098 __ lw(RA, Address(SP, 0 * kWordSize));
2098 __ lw(THR, Address(SP, 1 * kWordSize)); 2099 __ lw(THR, Address(SP, 1 * kWordSize));
2099 __ addiu(SP, SP, Immediate(2 * kWordSize)); 2100 __ lw(CODE_REG, Address(SP, 2 * kWordSize));
2101 __ addiu(SP, SP, Immediate(3 * kWordSize));
2100 __ Ret(); 2102 __ Ret();
2101 } 2103 }
2102 2104
2103 2105
2104 ASSEMBLER_TEST_GENERATE(ComputeRange, assembler) { 2106 ASSEMBLER_TEST_GENERATE(ComputeRange, assembler) {
2105 Label miss, done; 2107 Label miss, done;
2106 __ ComputeRange(V0, A0, &miss); 2108 __ ComputeRange(V0, A0, &miss);
2107 __ b(&done); 2109 __ b(&done);
2108 2110
2109 __ Bind(&miss); 2111 __ Bind(&miss);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2148 2150
2149 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw())); 2151 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw()));
2150 2152
2151 #undef RANGE_OF 2153 #undef RANGE_OF
2152 } 2154 }
2153 2155
2154 2156
2155 } // namespace dart 2157 } // namespace dart
2156 2158
2157 #endif // defined TARGET_ARCH_MIPS 2159 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/assembler_mips.cc ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698