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

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

Issue 1272223002: VM: Simplify assembler test by removing unused parameter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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_ia32_test.cc ('k') | runtime/vm/assembler_test.cc » ('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 2065 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32_test.cc ('k') | runtime/vm/assembler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698