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

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

Issue 1471913006: [turbofan] Implemented the optional Float32RoundDown operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed a debugging printf. 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
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 #ifndef V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ 5 #ifndef V8_CCTEST_COMPILER_CODEGEN_TESTER_H_
6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ 6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_
7 7
8 #include "src/compiler/instruction-selector.h" 8 #include "src/compiler/instruction-selector.h"
9 #include "src/compiler/pipeline.h" 9 #include "src/compiler/pipeline.h"
10 #include "src/compiler/raw-machine-assembler.h" 10 #include "src/compiler/raw-machine-assembler.h"
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 void Run(RawMachineAssemblerTester<int32_t>* m); 505 void Run(RawMachineAssemblerTester<int32_t>* m);
506 void RunLeft(RawMachineAssemblerTester<int32_t>* m); 506 void RunLeft(RawMachineAssemblerTester<int32_t>* m);
507 void RunRight(RawMachineAssemblerTester<int32_t>* m); 507 void RunRight(RawMachineAssemblerTester<int32_t>* m);
508 }; 508 };
509 509
510 // TODO(bmeurer): Drop this crap once we switch to GTest/Gmock. 510 // TODO(bmeurer): Drop this crap once we switch to GTest/Gmock.
511 static inline void CheckFloatEq(volatile float x, volatile float y) { 511 static inline void CheckFloatEq(volatile float x, volatile float y) {
512 if (std::isnan(x)) { 512 if (std::isnan(x)) {
513 CHECK(std::isnan(y)); 513 CHECK(std::isnan(y));
514 } else { 514 } else {
515 CHECK(x == y); 515 CHECK_EQ(x, y);
516 } 516 }
517 } 517 }
518 518
519 static inline void CheckDoubleEq(volatile double x, volatile double y) { 519 static inline void CheckDoubleEq(volatile double x, volatile double y) {
520 if (std::isnan(x)) { 520 if (std::isnan(x)) {
521 CHECK(std::isnan(y)); 521 CHECK(std::isnan(y));
522 } else { 522 } else {
523 CHECK_EQ(x, y); 523 CHECK_EQ(x, y);
524 } 524 }
525 } 525 }
526 526
527 } // namespace compiler 527 } // namespace compiler
528 } // namespace internal 528 } // namespace internal
529 } // namespace v8 529 } // namespace v8
530 530
531 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ 531 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698