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

Side by Side Diff: test/cctest/test-assembler-x87.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 | « test/cctest/test-assembler-x64.cc ('k') | test/cctest/test-code-stubs-arm.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 182
183 183
184 typedef int (*F7)(double x, double y); 184 typedef int (*F7)(double x, double y);
185 185
186 TEST(AssemblerIa329) { 186 TEST(AssemblerIa329) {
187 CcTest::InitializeVM(); 187 CcTest::InitializeVM();
188 Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate()); 188 Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
189 HandleScope scope(isolate); 189 HandleScope scope(isolate);
190 v8::internal::byte buffer[256]; 190 v8::internal::byte buffer[256];
191 MacroAssembler assm(isolate, buffer, sizeof buffer); 191 MacroAssembler assm(isolate, buffer, sizeof(buffer),
192 v8::internal::CodeObjectRequired::kYes);
192 enum { kEqual = 0, kGreater = 1, kLess = 2, kNaN = 3, kUndefined = 4 }; 193 enum { kEqual = 0, kGreater = 1, kLess = 2, kNaN = 3, kUndefined = 4 };
193 Label equal_l, less_l, greater_l, nan_l; 194 Label equal_l, less_l, greater_l, nan_l;
194 __ fld_d(Operand(esp, 3 * kPointerSize)); 195 __ fld_d(Operand(esp, 3 * kPointerSize));
195 __ fld_d(Operand(esp, 1 * kPointerSize)); 196 __ fld_d(Operand(esp, 1 * kPointerSize));
196 __ FCmp(); 197 __ FCmp();
197 __ j(parity_even, &nan_l); 198 __ j(parity_even, &nan_l);
198 __ j(equal, &equal_l); 199 __ j(equal, &equal_l);
199 __ j(below, &less_l); 200 __ j(below, &less_l);
200 __ j(above, &greater_l); 201 __ j(above, &greater_l);
201 202
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 #endif 404 #endif
404 F1 f = FUNCTION_CAST<F1>(code->entry()); 405 F1 f = FUNCTION_CAST<F1>(code->entry());
405 for (int i = 0; i < kNumCases; ++i) { 406 for (int i = 0; i < kNumCases; ++i) {
406 int res = f(i); 407 int res = f(i);
407 ::printf("f(%d) = %d\n", i, res); 408 ::printf("f(%d) = %d\n", i, res);
408 CHECK_EQ(values[i], res); 409 CHECK_EQ(values[i], res);
409 } 410 }
410 } 411 }
411 412
412 #undef __ 413 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-x64.cc ('k') | test/cctest/test-code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698