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

Side by Side Diff: test/cctest/compiler/test-operator.cc

Issue 422063005: Contribution of PowerPC port. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: re-upload - catch up to 8/19 level 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 "src/compiler/operator.h" 7 #include "src/compiler/operator.h"
8 #include "test/cctest/cctest.h" 8 #include "test/cctest/cctest.h"
9 9
10 using namespace v8::internal; 10 using namespace v8::internal;
11 using namespace v8::internal::compiler; 11 using namespace v8::internal::compiler;
12 12
13 // PPC builds fail on GCC 4.4.6 due to a warning in Operator1.
14 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
15
13 #define NaN (v8::base::OS::nan_value()) 16 #define NaN (v8::base::OS::nan_value())
14 #define Infinity (std::numeric_limits<double>::infinity()) 17 #define Infinity (std::numeric_limits<double>::infinity())
15 18
16 TEST(TestOperatorMnemonic) { 19 TEST(TestOperatorMnemonic) {
17 SimpleOperator op1(10, 0, 0, 0, "ThisOne"); 20 SimpleOperator op1(10, 0, 0, 0, "ThisOne");
18 CHECK_EQ(0, strcmp(op1.mnemonic(), "ThisOne")); 21 CHECK_EQ(0, strcmp(op1.mnemonic(), "ThisOne"));
19 22
20 SimpleOperator op2(11, 0, 0, 0, "ThatOne"); 23 SimpleOperator op2(11, 0, 0, 0, "ThatOne");
21 CHECK_EQ(0, strcmp(op2.mnemonic(), "ThatOne")); 24 CHECK_EQ(0, strcmp(op2.mnemonic(), "ThatOne"));
22 25
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 238
236 Operator1<double> op3(12, 0, 0, 1, "FooBar", 2e+123); 239 Operator1<double> op3(12, 0, 0, 1, "FooBar", 2e+123);
237 CHECK_EQ("FooBar[2e+123]", OperatorToString(&op3).get()); 240 CHECK_EQ("FooBar[2e+123]", OperatorToString(&op3).get());
238 241
239 Operator1<double> op4(12, 0, 0, 1, "BarFoo", Infinity); 242 Operator1<double> op4(12, 0, 0, 1, "BarFoo", Infinity);
240 CHECK_EQ("BarFoo[inf]", OperatorToString(&op4).get()); 243 CHECK_EQ("BarFoo[inf]", OperatorToString(&op4).get());
241 244
242 Operator1<double> op5(12, 0, 0, 1, "BarFoo", NaN); 245 Operator1<double> op5(12, 0, 0, 1, "BarFoo", NaN);
243 CHECK_EQ("BarFoo[nan]", OperatorToString(&op5).get()); 246 CHECK_EQ("BarFoo[nan]", OperatorToString(&op5).get());
244 } 247 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698