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

Side by Side Diff: test/cctest/test-assembler-arm64.cc

Issue 1476763002: Make whether or not a Code object should be created by masm explicit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: enum class FTW Created 5 years 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 | « src/x87/macro-assembler-x87.cc ('k') | test/cctest/test-assembler-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 #define BUF_SIZE 8192 111 #define BUF_SIZE 8192
112 #define SETUP() SETUP_SIZE(BUF_SIZE) 112 #define SETUP() SETUP_SIZE(BUF_SIZE)
113 113
114 #define INIT_V8() \ 114 #define INIT_V8() \
115 CcTest::InitializeVM(); \ 115 CcTest::InitializeVM(); \
116 116
117 #ifdef USE_SIMULATOR 117 #ifdef USE_SIMULATOR
118 118
119 // Run tests with the simulator. 119 // Run tests with the simulator.
120 #define SETUP_SIZE(buf_size) \ 120 #define SETUP_SIZE(buf_size) \
121 Isolate* isolate = CcTest::i_isolate(); \ 121 Isolate* isolate = CcTest::i_isolate(); \
122 HandleScope scope(isolate); \ 122 HandleScope scope(isolate); \
123 DCHECK(isolate != NULL); \ 123 DCHECK(isolate != NULL); \
124 byte* buf = new byte[buf_size]; \ 124 byte* buf = new byte[buf_size]; \
125 MacroAssembler masm(isolate, buf, buf_size); \ 125 MacroAssembler masm(isolate, buf, buf_size, \
126 Decoder<DispatchingDecoderVisitor>* decoder = \ 126 v8::internal::CodeObjectRequired::kYes); \
127 new Decoder<DispatchingDecoderVisitor>(); \ 127 Decoder<DispatchingDecoderVisitor>* decoder = \
128 Simulator simulator(decoder); \ 128 new Decoder<DispatchingDecoderVisitor>(); \
129 PrintDisassembler* pdis = NULL; \ 129 Simulator simulator(decoder); \
130 PrintDisassembler* pdis = NULL; \
130 RegisterDump core; 131 RegisterDump core;
131 132
132 /* if (Cctest::trace_sim()) { \ 133 /* if (Cctest::trace_sim()) { \
133 pdis = new PrintDisassembler(stdout); \ 134 pdis = new PrintDisassembler(stdout); \
134 decoder.PrependVisitor(pdis); \ 135 decoder.PrependVisitor(pdis); \
135 } \ 136 } \
136 */ 137 */
137 138
138 // Reset the assembler and simulator, so that instructions can be generated, 139 // Reset the assembler and simulator, so that instructions can be generated,
139 // but don't actually emit any code. This can be used by tests that need to 140 // but don't actually emit any code. This can be used by tests that need to
(...skipping 24 matching lines...) Expand all
164 __ PopCalleeSavedRegisters(); \ 165 __ PopCalleeSavedRegisters(); \
165 __ Ret(); \ 166 __ Ret(); \
166 __ GetCode(NULL); 167 __ GetCode(NULL);
167 168
168 #define TEARDOWN() \ 169 #define TEARDOWN() \
169 delete pdis; \ 170 delete pdis; \
170 delete[] buf; 171 delete[] buf;
171 172
172 #else // ifdef USE_SIMULATOR. 173 #else // ifdef USE_SIMULATOR.
173 // Run the test on real hardware or models. 174 // Run the test on real hardware or models.
174 #define SETUP_SIZE(buf_size) \ 175 #define SETUP_SIZE(buf_size) \
175 Isolate* isolate = CcTest::i_isolate(); \ 176 Isolate* isolate = CcTest::i_isolate(); \
176 HandleScope scope(isolate); \ 177 HandleScope scope(isolate); \
177 DCHECK(isolate != NULL); \ 178 DCHECK(isolate != NULL); \
178 byte* buf = new byte[buf_size]; \ 179 byte* buf = new byte[buf_size]; \
179 MacroAssembler masm(isolate, buf, buf_size); \ 180 MacroAssembler masm(isolate, buf, buf_size, \
181 v8::internal::CodeObjectRequired::kYes); \
180 RegisterDump core; 182 RegisterDump core;
181 183
182 #define RESET() \ 184 #define RESET() \
183 __ Reset(); \ 185 __ Reset(); \
184 /* Reset the machine state (like simulator.ResetState()). */ \ 186 /* Reset the machine state (like simulator.ResetState()). */ \
185 __ Msr(NZCV, xzr); \ 187 __ Msr(NZCV, xzr); \
186 __ Msr(FPCR, xzr); 188 __ Msr(FPCR, xzr);
187 189
188 190
189 #define START_AFTER_RESET() \ 191 #define START_AFTER_RESET() \
(...skipping 11145 matching lines...) Expand 10 before | Expand all | Expand 10 after
11335 __ Mov(x0, 1); 11337 __ Mov(x0, 1);
11336 11338
11337 END(); 11339 END();
11338 11340
11339 RUN(); 11341 RUN();
11340 11342
11341 CHECK_EQUAL_64(0x1, x0); 11343 CHECK_EQUAL_64(0x1, x0);
11342 11344
11343 TEARDOWN(); 11345 TEARDOWN();
11344 } 11346 }
OLDNEW
« no previous file with comments | « src/x87/macro-assembler-x87.cc ('k') | test/cctest/test-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698