OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef V8_COMPILER_CODE_GENERATOR_IMPL_H_ | 5 #ifndef V8_COMPILER_CODE_GENERATOR_IMPL_H_ |
6 #define V8_COMPILER_CODE_GENERATOR_IMPL_H_ | 6 #define V8_COMPILER_CODE_GENERATOR_IMPL_H_ |
7 | 7 |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/compiler/code-generator.h" | 9 #include "src/compiler/code-generator.h" |
10 #include "src/compiler/instruction.h" | 10 #include "src/compiler/instruction.h" |
(...skipping 25 matching lines...) Expand all Loading... | |
36 } | 36 } |
37 | 37 |
38 double InputDouble(size_t index) { return ToDouble(instr_->InputAt(index)); } | 38 double InputDouble(size_t index) { return ToDouble(instr_->InputAt(index)); } |
39 | 39 |
40 float InputFloat32(size_t index) { return ToFloat32(instr_->InputAt(index)); } | 40 float InputFloat32(size_t index) { return ToFloat32(instr_->InputAt(index)); } |
41 | 41 |
42 int32_t InputInt32(size_t index) { | 42 int32_t InputInt32(size_t index) { |
43 return ToConstant(instr_->InputAt(index)).ToInt32(); | 43 return ToConstant(instr_->InputAt(index)).ToInt32(); |
44 } | 44 } |
45 | 45 |
46 uint32_t InputUint32(size_t index) { | |
47 return bit_cast<uint32_t>(ToConstant(instr_->InputAt(index)).ToInt32()); | |
Benedikt Meurer
2016/04/20 04:06:28
Nit: return bit_cast<uint32_t>(InputInt32(index));
titzer
2016/04/20 09:02:02
Done.
| |
48 } | |
49 | |
46 int64_t InputInt64(size_t index) { | 50 int64_t InputInt64(size_t index) { |
47 return ToConstant(instr_->InputAt(index)).ToInt64(); | 51 return ToConstant(instr_->InputAt(index)).ToInt64(); |
48 } | 52 } |
49 | 53 |
50 int8_t InputInt8(size_t index) { | 54 int8_t InputInt8(size_t index) { |
51 return static_cast<int8_t>(InputInt32(index)); | 55 return static_cast<int8_t>(InputInt32(index)); |
52 } | 56 } |
53 | 57 |
54 int16_t InputInt16(size_t index) { | 58 int16_t InputInt16(size_t index) { |
55 return static_cast<int16_t>(InputInt32(index)); | 59 return static_cast<int16_t>(InputInt32(index)); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 | 189 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 |
186 masm->ud2(); | 190 masm->ud2(); |
187 #endif | 191 #endif |
188 } | 192 } |
189 | 193 |
190 } // namespace compiler | 194 } // namespace compiler |
191 } // namespace internal | 195 } // namespace internal |
192 } // namespace v8 | 196 } // namespace v8 |
193 | 197 |
194 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H | 198 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H |
OLD | NEW |