| Index: src/arm64/lithium-codegen-arm64.h
|
| diff --git a/src/arm64/lithium-codegen-arm64.h b/src/arm64/lithium-codegen-arm64.h
|
| index 4aea1fbcd1ce5f6cc0f715ce7ca393b8b752642f..8cae5b0496e893d7756ba8313e983dfa627edde3 100644
|
| --- a/src/arm64/lithium-codegen-arm64.h
|
| +++ b/src/arm64/lithium-codegen-arm64.h
|
| @@ -81,6 +81,7 @@ class LCodeGen: public LCodeGenBase {
|
| // information on it.
|
| void FinishCode(Handle<Code> code);
|
|
|
| + enum IntegerSignedness { SIGNED_INT32, UNSIGNED_INT32 };
|
| // Support for converting LOperands to assembler types.
|
| // LOperand must be a register.
|
| Register ToRegister(LOperand* op) const;
|
| @@ -93,6 +94,25 @@ class LCodeGen: public LCodeGenBase {
|
| StackMode stack_mode = kCanUseStackPointer) const;
|
| Handle<Object> ToHandle(LConstantOperand* op) const;
|
|
|
| + template<class LI>
|
| + Operand ToShiftedRightOperand32I(LOperand* right,
|
| + LI* shift_info) {
|
| + return ToShiftedRightOperand32(right, shift_info, SIGNED_INT32);
|
| + }
|
| + template<class LI>
|
| + Operand ToShiftedRightOperand32U(LOperand* right,
|
| + LI* shift_info) {
|
| + return ToShiftedRightOperand32(right, shift_info, UNSIGNED_INT32);
|
| + }
|
| + template<class LI>
|
| + Operand ToShiftedRightOperand32(LOperand* right,
|
| + LI* shift_info,
|
| + IntegerSignedness signedness);
|
| +
|
| + int JSShiftAmountFromLConstant(LOperand* constant) {
|
| + return ToInteger32(LConstantOperand::cast(constant)) & 0x1f;
|
| + }
|
| +
|
| // TODO(jbramley): Examine these helpers and check that they make sense.
|
| // IsInteger32Constant returns true for smi constants, for example.
|
| bool IsInteger32Constant(LConstantOperand* op) const;
|
| @@ -122,7 +142,6 @@ class LCodeGen: public LCodeGenBase {
|
| Label* exit,
|
| Label* allocation_entry);
|
|
|
| - enum IntegerSignedness { SIGNED_INT32, UNSIGNED_INT32 };
|
| void DoDeferredNumberTagU(LInstruction* instr,
|
| LOperand* value,
|
| LOperand* temp1,
|
|
|