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

Side by Side Diff: test/cctest/compiler/codegen-tester.cc

Issue 541343003: Platform-dependent turbofan tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/cctest/compiler/test-simplified-lowering.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "test/cctest/cctest.h" 7 #include "test/cctest/cctest.h"
8 #include "test/cctest/compiler/codegen-tester.h" 8 #include "test/cctest/compiler/codegen-tester.h"
9 #include "test/cctest/compiler/value-helper.h" 9 #include "test/cctest/compiler/value-helper.h"
10 10
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 RawMachineAssemblerTester<int32_t>* m) { 362 RawMachineAssemblerTester<int32_t>* m) {
363 FOR_UINT32_INPUTS(i) { 363 FOR_UINT32_INPUTS(i) {
364 input_b = *i; 364 input_b = *i;
365 int32_t expect = gen->expected(input_a, input_b); 365 int32_t expect = gen->expected(input_a, input_b);
366 if (false) printf(" cmp(a=%d, b=%d) ?== %d\n", input_a, input_b, expect); 366 if (false) printf(" cmp(a=%d, b=%d) ?== %d\n", input_a, input_b, expect);
367 CHECK_EQ(expect, m->Call(input_a, input_b)); 367 CHECK_EQ(expect, m->Call(input_a, input_b));
368 } 368 }
369 } 369 }
370 370
371 371
372 #if V8_TURBOFAN_TARGET
373
372 TEST(ParametersEqual) { 374 TEST(ParametersEqual) {
373 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachInt32); 375 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachInt32);
374 Node* p1 = m.Parameter(1); 376 Node* p1 = m.Parameter(1);
375 CHECK_NE(NULL, p1); 377 CHECK_NE(NULL, p1);
376 Node* p0 = m.Parameter(0); 378 Node* p0 = m.Parameter(0);
377 CHECK_NE(NULL, p0); 379 CHECK_NE(NULL, p0);
378 CHECK_EQ(p0, m.Parameter(0)); 380 CHECK_EQ(p0, m.Parameter(0));
379 CHECK_EQ(p1, m.Parameter(1)); 381 CHECK_EQ(p1, m.Parameter(1));
380 } 382 }
381 383
382 384
383 #if V8_TURBOFAN_TARGET
384
385 void RunSmiConstant(int32_t v) { 385 void RunSmiConstant(int32_t v) {
386 // TODO(dcarney): on x64 Smis are generated with the SmiConstantRegister 386 // TODO(dcarney): on x64 Smis are generated with the SmiConstantRegister
387 #if !V8_TARGET_ARCH_X64 387 #if !V8_TARGET_ARCH_X64
388 if (Smi::IsValid(v)) { 388 if (Smi::IsValid(v)) {
389 RawMachineAssemblerTester<Object*> m; 389 RawMachineAssemblerTester<Object*> m;
390 m.Return(m.NumberConstant(v)); 390 m.Return(m.NumberConstant(v));
391 CHECK_EQ(Smi::FromInt(v), m.Call()); 391 CHECK_EQ(Smi::FromInt(v), m.Call());
392 } 392 }
393 #endif 393 #endif
394 } 394 }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 { 568 {
569 RawMachineAssemblerTester<int32_t> m; 569 RawMachineAssemblerTester<int32_t> m;
570 Float64BinopTester bt(&m); 570 Float64BinopTester bt(&m);
571 bt.AddReturn(bt.param1); 571 bt.AddReturn(bt.param1);
572 572
573 FOR_FLOAT64_INPUTS(i) { CHECK_EQ(*i, bt.call(-11.25, *i)); } 573 FOR_FLOAT64_INPUTS(i) { CHECK_EQ(*i, bt.call(-11.25, *i)); }
574 } 574 }
575 } 575 }
576 576
577 #endif // V8_TURBOFAN_TARGET 577 #endif // V8_TURBOFAN_TARGET
OLDNEW
« no previous file with comments | « no previous file | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698