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

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

Issue 1645653002: [turbofan] Add the StackSlot operator to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Explicitly state the type of test values. Created 4 years, 10 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
« no previous file with comments | « test/cctest/compiler/codegen-tester.h ('k') | test/cctest/compiler/test-run-native-calls.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. Use of this 1 // Copyright 2014 the V8 project authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include <cmath> 5 #include <cmath>
6 #include <functional> 6 #include <functional>
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/utils/random-number-generator.h" 10 #include "src/base/utils/random-number-generator.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 CHECK_EQ(7, m.Call(uint32_t(0xdfbec580))); 65 CHECK_EQ(7, m.Call(uint32_t(0xdfbec580)));
66 CHECK_EQ(6, m.Call(uint32_t(0x27a9db40))); 66 CHECK_EQ(6, m.Call(uint32_t(0x27a9db40)));
67 CHECK_EQ(5, m.Call(uint32_t(0xde3bcb20))); 67 CHECK_EQ(5, m.Call(uint32_t(0xde3bcb20)));
68 CHECK_EQ(4, m.Call(uint32_t(0xd7e8a610))); 68 CHECK_EQ(4, m.Call(uint32_t(0xd7e8a610)));
69 CHECK_EQ(3, m.Call(uint32_t(0x9afdbc88))); 69 CHECK_EQ(3, m.Call(uint32_t(0x9afdbc88)));
70 CHECK_EQ(2, m.Call(uint32_t(0x9afdbc84))); 70 CHECK_EQ(2, m.Call(uint32_t(0x9afdbc84)));
71 CHECK_EQ(1, m.Call(uint32_t(0x9afdbc82))); 71 CHECK_EQ(1, m.Call(uint32_t(0x9afdbc82)));
72 CHECK_EQ(0, m.Call(uint32_t(0x9afdbc81))); 72 CHECK_EQ(0, m.Call(uint32_t(0x9afdbc81)));
73 } 73 }
74 74
75
76 TEST(RunWord32Clz) { 75 TEST(RunWord32Clz) {
77 BufferedRawMachineAssemblerTester<int32_t> m(MachineType::Uint32()); 76 BufferedRawMachineAssemblerTester<int32_t> m(MachineType::Uint32());
78 m.Return(m.Word32Clz(m.Parameter(0))); 77 m.Return(m.Word32Clz(m.Parameter(0)));
79 78
80 CHECK_EQ(0, m.Call(uint32_t(0x80001000))); 79 CHECK_EQ(0, m.Call(uint32_t(0x80001000)));
81 CHECK_EQ(1, m.Call(uint32_t(0x40000500))); 80 CHECK_EQ(1, m.Call(uint32_t(0x40000500)));
82 CHECK_EQ(2, m.Call(uint32_t(0x20000300))); 81 CHECK_EQ(2, m.Call(uint32_t(0x20000300)));
83 CHECK_EQ(3, m.Call(uint32_t(0x10000003))); 82 CHECK_EQ(3, m.Call(uint32_t(0x10000003)));
84 CHECK_EQ(4, m.Call(uint32_t(0x08050000))); 83 CHECK_EQ(4, m.Call(uint32_t(0x08050000)));
85 CHECK_EQ(5, m.Call(uint32_t(0x04006000))); 84 CHECK_EQ(5, m.Call(uint32_t(0x04006000)));
(...skipping 5997 matching lines...) Expand 10 before | Expand all | Expand 10 after
6083 Node* call = r.AddNode(r.common()->Call(desc), phi); 6082 Node* call = r.AddNode(r.common()->Call(desc), phi);
6084 r.Return(call); 6083 r.Return(call);
6085 6084
6086 CHECK_EQ(33, r.Call(1)); 6085 CHECK_EQ(33, r.Call(1));
6087 CHECK_EQ(44, r.Call(0)); 6086 CHECK_EQ(44, r.Call(0));
6088 } 6087 }
6089 6088
6090 } // namespace compiler 6089 } // namespace compiler
6091 } // namespace internal 6090 } // namespace internal
6092 } // namespace v8 6091 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/codegen-tester.h ('k') | test/cctest/compiler/test-run-native-calls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698