OLD | NEW |
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 | 185 |
186 #define START_AFTER_RESET() \ | 186 #define START_AFTER_RESET() \ |
187 __ SetStackPointer(csp); \ | 187 __ SetStackPointer(csp); \ |
188 __ PushCalleeSavedRegisters(); | 188 __ PushCalleeSavedRegisters(); |
189 | 189 |
190 #define START() \ | 190 #define START() \ |
191 RESET(); \ | 191 RESET(); \ |
192 START_AFTER_RESET(); | 192 START_AFTER_RESET(); |
193 | 193 |
194 #define RUN() \ | 194 #define RUN() \ |
195 CpuFeatures::FlushICache(buf, masm.SizeOfGeneratedCode()); \ | 195 Assembler::FlushICache(isolate, buf, masm.SizeOfGeneratedCode()); \ |
196 { \ | 196 { \ |
197 void (*test_function)(void); \ | 197 void (*test_function)(void); \ |
198 memcpy(&test_function, &buf, sizeof(buf)); \ | 198 memcpy(&test_function, &buf, sizeof(buf)); \ |
199 test_function(); \ | 199 test_function(); \ |
200 } | 200 } |
201 | 201 |
202 #define END() \ | 202 #define END() \ |
203 core.Dump(&masm); \ | 203 core.Dump(&masm); \ |
204 __ PopCalleeSavedRegisters(); \ | 204 __ PopCalleeSavedRegisters(); \ |
205 __ Ret(); \ | 205 __ Ret(); \ |
206 __ GetCode(NULL); | 206 __ GetCode(NULL); |
207 | 207 |
208 #define TEARDOWN() \ | 208 #define TEARDOWN() \ |
209 delete[] buf; | 209 delete[] buf; |
(...skipping 11122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11332 __ Mov(x0, 1); | 11332 __ Mov(x0, 1); |
11333 | 11333 |
11334 END(); | 11334 END(); |
11335 | 11335 |
11336 RUN(); | 11336 RUN(); |
11337 | 11337 |
11338 CHECK_EQUAL_64(0x1, x0); | 11338 CHECK_EQUAL_64(0x1, x0); |
11339 | 11339 |
11340 TEARDOWN(); | 11340 TEARDOWN(); |
11341 } | 11341 } |
OLD | NEW |