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

Side by Side Diff: test/cctest/compiler/test-run-machops.cc

Issue 600383002: [turbofan] Add backend support for Float32Constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add InstructionSelector unit test. Created 6 years, 2 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 | « src/compiler/x64/code-generator-x64.cc ('k') | no next file » | 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 <functional> 5 #include <functional>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/compiler/generic-node-inl.h" 9 #include "src/compiler/generic-node-inl.h"
10 #include "test/cctest/cctest.h" 10 #include "test/cctest/cctest.h"
(...skipping 4257 matching lines...) Expand 10 before | Expand all | Expand 10 after
4268 m.TruncateFloat64ToFloat32(m.LoadFromPointer(&input, kMachFloat64))); 4268 m.TruncateFloat64ToFloat32(m.LoadFromPointer(&input, kMachFloat64)));
4269 m.Return(m.Int32Constant(0)); 4269 m.Return(m.Int32Constant(0));
4270 FOR_FLOAT64_INPUTS(i) { 4270 FOR_FLOAT64_INPUTS(i) {
4271 input = *i; 4271 input = *i;
4272 volatile double expected = DoubleToFloat32(input); 4272 volatile double expected = DoubleToFloat32(input);
4273 CHECK_EQ(0, m.Call()); 4273 CHECK_EQ(0, m.Call());
4274 CHECK_EQ(expected, actual); 4274 CHECK_EQ(expected, actual);
4275 } 4275 }
4276 } 4276 }
4277 4277
4278
4279 TEST(RunFloat32Constant) {
4280 FOR_FLOAT32_INPUTS(i) {
4281 float expected = *i;
4282 float actual = *i;
4283 RawMachineAssemblerTester<int32_t> m;
4284 m.StoreToPointer(&actual, kMachFloat32, m.Float32Constant(expected));
4285 m.Return(m.Int32Constant(0));
4286 CHECK_EQ(0, m.Call());
4287 CHECK_EQ(expected, actual);
4288 }
4289 }
4290
4278 #endif // V8_TURBOFAN_TARGET 4291 #endif // V8_TURBOFAN_TARGET
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698