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

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

Issue 500343002: [turbofan] Add backend support for load/store float32 values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE 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 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 2733 matching lines...) Expand 10 before | Expand all | Expand 10 after
2744 2744
2745 2745
2746 TEST(RunLoadStore) { 2746 TEST(RunLoadStore) {
2747 RunLoadStore<int8_t>(kMachInt8); 2747 RunLoadStore<int8_t>(kMachInt8);
2748 RunLoadStore<uint8_t>(kMachUint8); 2748 RunLoadStore<uint8_t>(kMachUint8);
2749 RunLoadStore<int16_t>(kMachInt16); 2749 RunLoadStore<int16_t>(kMachInt16);
2750 RunLoadStore<uint16_t>(kMachUint16); 2750 RunLoadStore<uint16_t>(kMachUint16);
2751 RunLoadStore<int32_t>(kMachInt32); 2751 RunLoadStore<int32_t>(kMachInt32);
2752 RunLoadStore<uint32_t>(kMachUint32); 2752 RunLoadStore<uint32_t>(kMachUint32);
2753 RunLoadStore<void*>(kMachAnyTagged); 2753 RunLoadStore<void*>(kMachAnyTagged);
2754 RunLoadStore<float>(kMachFloat32);
2754 RunLoadStore<double>(kMachFloat64); 2755 RunLoadStore<double>(kMachFloat64);
2755 } 2756 }
2756 2757
2757 2758
2758 TEST(RunFloat64Binop) { 2759 TEST(RunFloat64Binop) {
2759 RawMachineAssemblerTester<int32_t> m; 2760 RawMachineAssemblerTester<int32_t> m;
2760 double result; 2761 double result;
2761 2762
2762 Operator* ops[] = {m.machine()->Float64Add(), m.machine()->Float64Sub(), 2763 Operator* ops[] = {m.machine()->Float64Add(), m.machine()->Float64Sub(),
2763 m.machine()->Float64Mul(), m.machine()->Float64Div(), 2764 m.machine()->Float64Mul(), m.machine()->Float64Div(),
(...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after
4315 RawMachineAssemblerTester<int32_t> m; 4316 RawMachineAssemblerTester<int32_t> m;
4316 m.Return(m.TruncateFloat64ToInt32(m.LoadFromPointer(&input, kMachFloat64))); 4317 m.Return(m.TruncateFloat64ToInt32(m.LoadFromPointer(&input, kMachFloat64)));
4317 for (size_t i = 0; i < ARRAY_SIZE(kValues); ++i) { 4318 for (size_t i = 0; i < ARRAY_SIZE(kValues); ++i) {
4318 input = kValues[i].from; 4319 input = kValues[i].from;
4319 uint64_t expected = static_cast<int64_t>(kValues[i].raw); 4320 uint64_t expected = static_cast<int64_t>(kValues[i].raw);
4320 CHECK_EQ(static_cast<int>(expected), m.Call()); 4321 CHECK_EQ(static_cast<int>(expected), m.Call());
4321 } 4322 }
4322 } 4323 }
4323 4324
4324 #endif // V8_TURBOFAN_TARGET 4325 #endif // V8_TURBOFAN_TARGET
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | test/compiler-unittests/arm/instruction-selector-arm-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698