OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ARM_LITHIUM_CODEGEN_ARM_H_ | 5 #ifndef V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
6 #define V8_ARM_LITHIUM_CODEGEN_ARM_H_ | 6 #define V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
7 | 7 |
8 #include "src/arm/lithium-arm.h" | 8 #include "src/arm/lithium-arm.h" |
9 | 9 |
10 #include "src/arm/lithium-gap-resolver-arm.h" | 10 #include "src/arm/lithium-gap-resolver-arm.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 DwVfpRegister dbl_scratch); | 79 DwVfpRegister dbl_scratch); |
80 int32_t ToRepresentation(LConstantOperand* op, const Representation& r) const; | 80 int32_t ToRepresentation(LConstantOperand* op, const Representation& r) const; |
81 int32_t ToInteger32(LConstantOperand* op) const; | 81 int32_t ToInteger32(LConstantOperand* op) const; |
82 Smi* ToSmi(LConstantOperand* op) const; | 82 Smi* ToSmi(LConstantOperand* op) const; |
83 double ToDouble(LConstantOperand* op) const; | 83 double ToDouble(LConstantOperand* op) const; |
84 Operand ToOperand(LOperand* op); | 84 Operand ToOperand(LOperand* op); |
85 MemOperand ToMemOperand(LOperand* op) const; | 85 MemOperand ToMemOperand(LOperand* op) const; |
86 // Returns a MemOperand pointing to the high word of a DoubleStackSlot. | 86 // Returns a MemOperand pointing to the high word of a DoubleStackSlot. |
87 MemOperand ToHighMemOperand(LOperand* op) const; | 87 MemOperand ToHighMemOperand(LOperand* op) const; |
88 | 88 |
| 89 template<class LI> |
| 90 Operand ToShiftedRightOperand(LOperand* right, LI* shift_info); |
| 91 |
| 92 int JSShiftAmountFromLConstant(LOperand* constant) { |
| 93 return ToInteger32(LConstantOperand::cast(constant)) & 0x1f; |
| 94 } |
| 95 |
89 bool IsInteger32(LConstantOperand* op) const; | 96 bool IsInteger32(LConstantOperand* op) const; |
90 bool IsSmi(LConstantOperand* op) const; | 97 bool IsSmi(LConstantOperand* op) const; |
91 Handle<Object> ToHandle(LConstantOperand* op) const; | 98 Handle<Object> ToHandle(LConstantOperand* op) const; |
92 | 99 |
93 // Try to generate code for the entire chunk, but it may fail if the | 100 // Try to generate code for the entire chunk, but it may fail if the |
94 // chunk contains constructs we cannot handle. Returns true if the | 101 // chunk contains constructs we cannot handle. Returns true if the |
95 // code generation attempt succeeded. | 102 // code generation attempt succeeded. |
96 bool GenerateCode(); | 103 bool GenerateCode(); |
97 | 104 |
98 // Finish the code by setting stack height, safepoint, and bailout | 105 // Finish the code by setting stack height, safepoint, and bailout |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 LCodeGen* codegen_; | 435 LCodeGen* codegen_; |
429 Label entry_; | 436 Label entry_; |
430 Label exit_; | 437 Label exit_; |
431 Label* external_exit_; | 438 Label* external_exit_; |
432 int instruction_index_; | 439 int instruction_index_; |
433 }; | 440 }; |
434 | 441 |
435 } } // namespace v8::internal | 442 } } // namespace v8::internal |
436 | 443 |
437 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ | 444 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
OLD | NEW |