OLD | NEW |
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 4183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4194 | 4194 |
4195 m.Return(m.TruncateFloat64ToFloat32(m.Parameter(0))); | 4195 m.Return(m.TruncateFloat64ToFloat32(m.Parameter(0))); |
4196 | 4196 |
4197 FOR_FLOAT64_INPUTS(i) { CHECK_FLOAT_EQ(DoubleToFloat32(*i), m.Call(*i)); } | 4197 FOR_FLOAT64_INPUTS(i) { CHECK_FLOAT_EQ(DoubleToFloat32(*i), m.Call(*i)); } |
4198 } | 4198 } |
4199 | 4199 |
4200 uint64_t ToInt64(uint32_t low, uint32_t high) { | 4200 uint64_t ToInt64(uint32_t low, uint32_t high) { |
4201 return (static_cast<uint64_t>(high) << 32) | static_cast<uint64_t>(low); | 4201 return (static_cast<uint64_t>(high) << 32) | static_cast<uint64_t>(low); |
4202 } | 4202 } |
4203 | 4203 |
4204 #if V8_TARGET_ARCH_32_BIT && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_PPC && \ | 4204 #if V8_TARGET_ARCH_32_BIT && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_X87 |
4205 !V8_TARGET_ARCH_X87 | |
4206 TEST(RunInt32PairAdd) { | 4205 TEST(RunInt32PairAdd) { |
4207 BufferedRawMachineAssemblerTester<int32_t> m( | 4206 BufferedRawMachineAssemblerTester<int32_t> m( |
4208 MachineType::Uint32(), MachineType::Uint32(), MachineType::Uint32(), | 4207 MachineType::Uint32(), MachineType::Uint32(), MachineType::Uint32(), |
4209 MachineType::Uint32()); | 4208 MachineType::Uint32()); |
4210 | 4209 |
4211 uint32_t high; | 4210 uint32_t high; |
4212 uint32_t low; | 4211 uint32_t low; |
4213 | 4212 |
4214 Node* PairAdd = m.Int32PairAdd(m.Parameter(0), m.Parameter(1), m.Parameter(2), | 4213 Node* PairAdd = m.Int32PairAdd(m.Parameter(0), m.Parameter(1), m.Parameter(2), |
4215 m.Parameter(3)); | 4214 m.Parameter(3)); |
(...skipping 2101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6317 r.Goto(&merge); | 6316 r.Goto(&merge); |
6318 r.Bind(&merge); | 6317 r.Bind(&merge); |
6319 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb); | 6318 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb); |
6320 r.Return(phi); | 6319 r.Return(phi); |
6321 CHECK_EQ(1, r.Call(1)); | 6320 CHECK_EQ(1, r.Call(1)); |
6322 } | 6321 } |
6323 | 6322 |
6324 } // namespace compiler | 6323 } // namespace compiler |
6325 } // namespace internal | 6324 } // namespace internal |
6326 } // namespace v8 | 6325 } // namespace v8 |
OLD | NEW |