| OLD | NEW |
| 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 <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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 Node* a = Int32Input(&m, j); | 75 Node* a = Int32Input(&m, j); |
| 76 Node* b = Int32Input(&m, k); | 76 Node* b = Int32Input(&m, k); |
| 77 m.Return(m.NewNode(kOps[i], a, b)); | 77 m.Return(m.NewNode(kOps[i], a, b)); |
| 78 m.GenerateCode(); | 78 m.GenerateCode(); |
| 79 } | 79 } |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 | 83 |
| 84 | 84 |
| 85 TEST(CodeGenNop) { |
| 86 RawMachineAssemblerTester<void> m; |
| 87 m.Return(m.Int32Constant(0)); |
| 88 m.GenerateCode(); |
| 89 } |
| 90 |
| 91 |
| 85 #if V8_TURBOFAN_BACKEND_64 | 92 #if V8_TURBOFAN_BACKEND_64 |
| 86 static Node* Int64Input(RawMachineAssemblerTester<int64_t>* m, int index) { | 93 static Node* Int64Input(RawMachineAssemblerTester<int64_t>* m, int index) { |
| 87 switch (index) { | 94 switch (index) { |
| 88 case 0: | 95 case 0: |
| 89 return m->Parameter(0); | 96 return m->Parameter(0); |
| 90 case 1: | 97 case 1: |
| 91 return m->Parameter(1); | 98 return m->Parameter(1); |
| 92 case 2: | 99 case 2: |
| 93 return m->Int64Constant(0); | 100 return m->Int64Constant(0); |
| 94 case 3: | 101 case 3: |
| (...skipping 5174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5269 param, param, param, param)); | 5276 param, param, param, param)); |
| 5270 FOR_INT32_INPUTS(i) { | 5277 FOR_INT32_INPUTS(i) { |
| 5271 int32_t const x = *i; | 5278 int32_t const x = *i; |
| 5272 CHECK_EQ(x * 8, m.Call(x)); | 5279 CHECK_EQ(x * 8, m.Call(x)); |
| 5273 } | 5280 } |
| 5274 } | 5281 } |
| 5275 | 5282 |
| 5276 #endif // USE_SIMULATOR | 5283 #endif // USE_SIMULATOR |
| 5277 | 5284 |
| 5278 #endif // V8_TURBOFAN_TARGET | 5285 #endif // V8_TURBOFAN_TARGET |
| OLD | NEW |