| 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_ARM64_LITHIUM_ARM64_H_ | 5 #ifndef V8_ARM64_LITHIUM_ARM64_H_ |
| 6 #define V8_ARM64_LITHIUM_ARM64_H_ | 6 #define V8_ARM64_LITHIUM_ARM64_H_ |
| 7 | 7 |
| 8 #include "src/hydrogen.h" | 8 #include "src/hydrogen.h" |
| 9 #include "src/lithium.h" | 9 #include "src/lithium.h" |
| 10 #include "src/lithium-allocator.h" | 10 #include "src/lithium-allocator.h" |
| 11 #include "src/safepoint-table.h" | 11 #include "src/safepoint-table.h" |
| 12 #include "src/utils.h" | 12 #include "src/utils.h" |
| 13 | 13 |
| 14 namespace v8 { | 14 namespace v8 { |
| 15 namespace internal { | 15 namespace internal { |
| 16 | 16 |
| 17 // Forward declarations. | 17 // Forward declarations. |
| 18 class LCodeGen; | 18 class LCodeGen; |
| 19 | 19 |
| 20 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ | 20 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ |
| 21 V(AccessArgumentsAt) \ | 21 V(AccessArgumentsAt) \ |
| 22 V(AddE) \ | 22 V(AddE) \ |
| 23 V(AddI) \ | 23 V(AddI) \ |
| 24 V(AddS) \ | 24 V(AddS) \ |
| 25 V(Allocate) \ | 25 V(Allocate) \ |
| 26 V(AllocateBlockContext) \ | 26 V(AllocateBlockContext) \ |
| 27 V(ApplyArguments) \ | 27 V(ApplyArguments) \ |
| 28 V(ArgumentsElements) \ | 28 V(ArgumentsElements) \ |
| 29 V(ArgumentsLength) \ | 29 V(ArgumentsLength) \ |
| 30 V(ArithmeticD) \ | 30 V(ArithmeticD) \ |
| 31 V(ArithmeticT) \ | 31 V(ArithmeticT) \ |
| 32 V(BitI) \ | 32 V(BitI) \ |
| 33 V(BitS) \ | 33 V(BitS) \ |
| 34 V(BoundsCheck) \ | 34 V(BoundsCheck) \ |
| 35 V(Branch) \ | 35 V(Branch) \ |
| 36 V(CallFunction) \ | 36 V(CallFunction) \ |
| 37 V(CallJSFunction) \ | 37 V(CallJSFunction) \ |
| 38 V(CallNew) \ | 38 V(CallNew) \ |
| 39 V(CallNewArray) \ | 39 V(CallNewArray) \ |
| 40 V(CallRuntime) \ | 40 V(CallRuntime) \ |
| 41 V(CallStub) \ | 41 V(CallStub) \ |
| 42 V(CallWithDescriptor) \ | 42 V(CallWithDescriptor) \ |
| 43 V(CheckInstanceType) \ | 43 V(CheckInstanceType) \ |
| 44 V(CheckMapValue) \ | 44 V(CheckMapValue) \ |
| 45 V(CheckMaps) \ | 45 V(CheckMaps) \ |
| 46 V(CheckNonSmi) \ | 46 V(CheckNonSmi) \ |
| 47 V(CheckSmi) \ | 47 V(CheckSmi) \ |
| 48 V(CheckValue) \ | 48 V(CheckValue) \ |
| 49 V(ClampDToUint8) \ | 49 V(ClampDToUint8) \ |
| 50 V(ClampIToUint8) \ | 50 V(ClampIToUint8) \ |
| 51 V(ClampTToUint8) \ | 51 V(ClampTToUint8) \ |
| 52 V(ClassOfTestAndBranch) \ | 52 V(ClassOfTestAndBranch) \ |
| 53 V(CmpHoleAndBranchD) \ | 53 V(CmpHoleAndBranchD) \ |
| 54 V(CmpHoleAndBranchT) \ | 54 V(CmpHoleAndBranchT) \ |
| 55 V(CmpMapAndBranch) \ | 55 V(CmpMapAndBranch) \ |
| 56 V(CmpObjectEqAndBranch) \ | 56 V(CmpObjectEqAndBranch) \ |
| 57 V(CmpT) \ | 57 V(CmpT) \ |
| 58 V(CompareMinusZeroAndBranch) \ | 58 V(CompareMinusZeroAndBranch) \ |
| 59 V(CompareNumericAndBranch) \ | 59 V(CompareNumericAndBranch) \ |
| 60 V(ConstantD) \ | 60 V(ConstantD) \ |
| 61 V(ConstantE) \ | 61 V(ConstantE) \ |
| 62 V(ConstantI) \ | 62 V(ConstantI) \ |
| 63 V(ConstantS) \ | 63 V(ConstantS) \ |
| 64 V(ConstantT) \ | 64 V(ConstantT) \ |
| 65 V(ConstructDouble) \ | 65 V(ConstructDouble) \ |
| 66 V(Context) \ | 66 V(Context) \ |
| 67 V(DateField) \ | 67 V(DateField) \ |
| 68 V(DebugBreak) \ | 68 V(DebugBreak) \ |
| 69 V(DeclareGlobals) \ | 69 V(DeclareGlobals) \ |
| 70 V(Deoptimize) \ | 70 V(Deoptimize) \ |
| 71 V(DivByConstI) \ | 71 V(DivByConstI) \ |
| 72 V(DivByPowerOf2I) \ | 72 V(DivByPowerOf2I) \ |
| 73 V(DivI) \ | 73 V(DivI) \ |
| 74 V(DoubleBits) \ | 74 V(DoubleBits) \ |
| 75 V(DoubleToIntOrSmi) \ | 75 V(DoubleToIntOrSmi) \ |
| 76 V(Drop) \ | 76 V(Drop) \ |
| 77 V(Dummy) \ | 77 V(Dummy) \ |
| 78 V(DummyUse) \ | 78 V(DummyUse) \ |
| 79 V(FlooringDivByConstI) \ | 79 V(FlooringDivByConstI) \ |
| 80 V(FlooringDivByPowerOf2I) \ | 80 V(FlooringDivByPowerOf2I) \ |
| 81 V(FlooringDivI) \ | 81 V(FlooringDivI) \ |
| 82 V(ForInCacheArray) \ | 82 V(ForInCacheArray) \ |
| 83 V(ForInPrepareMap) \ | 83 V(ForInPrepareMap) \ |
| 84 V(FunctionLiteral) \ | 84 V(FunctionLiteral) \ |
| 85 V(GetCachedArrayIndex) \ | 85 V(GetCachedArrayIndex) \ |
| 86 V(Goto) \ | 86 V(Goto) \ |
| 87 V(HasCachedArrayIndexAndBranch) \ | 87 V(HasCachedArrayIndexAndBranch) \ |
| 88 V(HasInstanceTypeAndBranch) \ | 88 V(HasInstanceTypeAndBranch) \ |
| 89 V(InnerAllocatedObject) \ | 89 V(InnerAllocatedObject) \ |
| 90 V(InstanceOf) \ | 90 V(InstanceOf) \ |
| 91 V(InstanceOfKnownGlobal) \ | 91 V(InstanceOfKnownGlobal) \ |
| 92 V(InstructionGap) \ | 92 V(InstructionGap) \ |
| 93 V(Integer32ToDouble) \ | 93 V(Integer32ToDouble) \ |
| 94 V(InvokeFunction) \ | 94 V(InvokeFunction) \ |
| 95 V(IsConstructCallAndBranch) \ | 95 V(IsConstructCallAndBranch) \ |
| 96 V(IsObjectAndBranch) \ | 96 V(IsObjectAndBranch) \ |
| 97 V(IsSmiAndBranch) \ | 97 V(IsSmiAndBranch) \ |
| 98 V(IsStringAndBranch) \ | 98 V(IsStringAndBranch) \ |
| 99 V(IsUndetectableAndBranch) \ | 99 V(IsUndetectableAndBranch) \ |
| 100 V(Label) \ | 100 V(Label) \ |
| 101 V(LazyBailout) \ | 101 V(LazyBailout) \ |
| 102 V(LoadContextSlot) \ | 102 V(LoadContextSlot) \ |
| 103 V(LoadFieldByIndex) \ | 103 V(LoadFieldByIndex) \ |
| 104 V(LoadFunctionPrototype) \ | 104 V(LoadFunctionPrototype) \ |
| 105 V(LoadGlobalCell) \ | 105 V(LoadGlobalCell) \ |
| 106 V(LoadGlobalGeneric) \ | 106 V(LoadGlobalGeneric) \ |
| 107 V(LoadKeyedExternal) \ | 107 V(LoadKeyedExternal) \ |
| 108 V(LoadKeyedFixed) \ | 108 V(LoadKeyedFixed) \ |
| 109 V(LoadKeyedFixedDouble) \ | 109 V(LoadKeyedFixedDouble) \ |
| 110 V(LoadKeyedGeneric) \ | 110 V(LoadKeyedGeneric) \ |
| 111 V(LoadNamedField) \ | 111 V(LoadNamedField) \ |
| 112 V(LoadNamedGeneric) \ | 112 V(LoadNamedGeneric) \ |
| 113 V(LoadRoot) \ | 113 V(LoadRoot) \ |
| 114 V(MapEnumLength) \ | 114 V(MapEnumLength) \ |
| 115 V(MathAbs) \ | 115 V(MathAbs) \ |
| 116 V(MathAbsTagged) \ | 116 V(MathAbsTagged) \ |
| 117 V(MathClz32) \ | 117 V(MathClz32) \ |
| 118 V(MathExp) \ | 118 V(MathExp) \ |
| 119 V(MathFloorD) \ | 119 V(MathFloorD) \ |
| 120 V(MathFloorI) \ | 120 V(MathFloorI) \ |
| 121 V(MathLog) \ | 121 V(MathFround) \ |
| 122 V(MathMinMax) \ | 122 V(MathLog) \ |
| 123 V(MathPowHalf) \ | 123 V(MathMinMax) \ |
| 124 V(MathRoundD) \ | 124 V(MathPowHalf) \ |
| 125 V(MathRoundI) \ | 125 V(MathRoundD) \ |
| 126 V(MathSqrt) \ | 126 V(MathRoundI) \ |
| 127 V(ModByConstI) \ | 127 V(MathSqrt) \ |
| 128 V(ModByPowerOf2I) \ | 128 V(ModByConstI) \ |
| 129 V(ModI) \ | 129 V(ModByPowerOf2I) \ |
| 130 V(MulConstIS) \ | 130 V(ModI) \ |
| 131 V(MulI) \ | 131 V(MulConstIS) \ |
| 132 V(MulS) \ | 132 V(MulI) \ |
| 133 V(NumberTagD) \ | 133 V(MulS) \ |
| 134 V(NumberTagU) \ | 134 V(NumberTagD) \ |
| 135 V(NumberUntagD) \ | 135 V(NumberTagU) \ |
| 136 V(OsrEntry) \ | 136 V(NumberUntagD) \ |
| 137 V(Parameter) \ | 137 V(OsrEntry) \ |
| 138 V(Power) \ | 138 V(Parameter) \ |
| 139 V(PreparePushArguments) \ | 139 V(Power) \ |
| 140 V(PushArguments) \ | 140 V(PreparePushArguments) \ |
| 141 V(RegExpLiteral) \ | 141 V(PushArguments) \ |
| 142 V(Return) \ | 142 V(RegExpLiteral) \ |
| 143 V(SeqStringGetChar) \ | 143 V(Return) \ |
| 144 V(SeqStringSetChar) \ | 144 V(SeqStringGetChar) \ |
| 145 V(ShiftI) \ | 145 V(SeqStringSetChar) \ |
| 146 V(ShiftS) \ | 146 V(ShiftI) \ |
| 147 V(SmiTag) \ | 147 V(ShiftS) \ |
| 148 V(SmiUntag) \ | 148 V(SmiTag) \ |
| 149 V(StackCheck) \ | 149 V(SmiUntag) \ |
| 150 V(StoreCodeEntry) \ | 150 V(StackCheck) \ |
| 151 V(StoreContextSlot) \ | 151 V(StoreCodeEntry) \ |
| 152 V(StoreFrameContext) \ | 152 V(StoreContextSlot) \ |
| 153 V(StoreGlobalCell) \ | 153 V(StoreFrameContext) \ |
| 154 V(StoreKeyedExternal) \ | 154 V(StoreGlobalCell) \ |
| 155 V(StoreKeyedFixed) \ | 155 V(StoreKeyedExternal) \ |
| 156 V(StoreKeyedFixedDouble) \ | 156 V(StoreKeyedFixed) \ |
| 157 V(StoreKeyedGeneric) \ | 157 V(StoreKeyedFixedDouble) \ |
| 158 V(StoreNamedField) \ | 158 V(StoreKeyedGeneric) \ |
| 159 V(StoreNamedGeneric) \ | 159 V(StoreNamedField) \ |
| 160 V(StringAdd) \ | 160 V(StoreNamedGeneric) \ |
| 161 V(StringCharCodeAt) \ | 161 V(StringAdd) \ |
| 162 V(StringCharFromCode) \ | 162 V(StringCharCodeAt) \ |
| 163 V(StringCompareAndBranch) \ | 163 V(StringCharFromCode) \ |
| 164 V(SubI) \ | 164 V(StringCompareAndBranch) \ |
| 165 V(SubS) \ | 165 V(SubI) \ |
| 166 V(TaggedToI) \ | 166 V(SubS) \ |
| 167 V(ThisFunction) \ | 167 V(TaggedToI) \ |
| 168 V(ToFastProperties) \ | 168 V(ThisFunction) \ |
| 169 V(TransitionElementsKind) \ | 169 V(ToFastProperties) \ |
| 170 V(TrapAllocationMemento) \ | 170 V(TransitionElementsKind) \ |
| 171 V(TruncateDoubleToIntOrSmi) \ | 171 V(TrapAllocationMemento) \ |
| 172 V(Typeof) \ | 172 V(TruncateDoubleToIntOrSmi) \ |
| 173 V(TypeofIsAndBranch) \ | 173 V(Typeof) \ |
| 174 V(Uint32ToDouble) \ | 174 V(TypeofIsAndBranch) \ |
| 175 V(UnknownOSRValue) \ | 175 V(Uint32ToDouble) \ |
| 176 V(UnknownOSRValue) \ |
| 176 V(WrapReceiver) | 177 V(WrapReceiver) |
| 177 | 178 |
| 178 | 179 |
| 179 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 180 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 180 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ | 181 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ |
| 181 return LInstruction::k##type; \ | 182 return LInstruction::k##type; \ |
| 182 } \ | 183 } \ |
| 183 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ | 184 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ |
| 184 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ | 185 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ |
| 185 return mnemonic; \ | 186 return mnemonic; \ |
| (...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2076 : LUnaryMathOperation<1>(value) { | 2077 : LUnaryMathOperation<1>(value) { |
| 2077 temps_[0] = temp1; | 2078 temps_[0] = temp1; |
| 2078 } | 2079 } |
| 2079 | 2080 |
| 2080 LOperand* temp1() { return temps_[0]; } | 2081 LOperand* temp1() { return temps_[0]; } |
| 2081 | 2082 |
| 2082 DECLARE_CONCRETE_INSTRUCTION(MathRoundI, "math-round-i") | 2083 DECLARE_CONCRETE_INSTRUCTION(MathRoundI, "math-round-i") |
| 2083 }; | 2084 }; |
| 2084 | 2085 |
| 2085 | 2086 |
| 2087 class LMathFround V8_FINAL : public LUnaryMathOperation<0> { |
| 2088 public: |
| 2089 explicit LMathFround(LOperand* value) : LUnaryMathOperation<0>(value) {} |
| 2090 |
| 2091 DECLARE_CONCRETE_INSTRUCTION(MathFround, "math-fround") |
| 2092 }; |
| 2093 |
| 2094 |
| 2086 class LMathSqrt V8_FINAL : public LUnaryMathOperation<0> { | 2095 class LMathSqrt V8_FINAL : public LUnaryMathOperation<0> { |
| 2087 public: | 2096 public: |
| 2088 explicit LMathSqrt(LOperand* value) : LUnaryMathOperation<0>(value) { } | 2097 explicit LMathSqrt(LOperand* value) : LUnaryMathOperation<0>(value) { } |
| 2089 DECLARE_CONCRETE_INSTRUCTION(MathSqrt, "math-sqrt") | 2098 DECLARE_CONCRETE_INSTRUCTION(MathSqrt, "math-sqrt") |
| 2090 }; | 2099 }; |
| 2091 | 2100 |
| 2092 | 2101 |
| 2093 class LModByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2102 class LModByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 2094 public: | 2103 public: |
| 2095 LModByPowerOf2I(LOperand* dividend, int32_t divisor) { | 2104 LModByPowerOf2I(LOperand* dividend, int32_t divisor) { |
| (...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3250 | 3259 |
| 3251 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 3260 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 3252 }; | 3261 }; |
| 3253 | 3262 |
| 3254 #undef DECLARE_HYDROGEN_ACCESSOR | 3263 #undef DECLARE_HYDROGEN_ACCESSOR |
| 3255 #undef DECLARE_CONCRETE_INSTRUCTION | 3264 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3256 | 3265 |
| 3257 } } // namespace v8::internal | 3266 } } // namespace v8::internal |
| 3258 | 3267 |
| 3259 #endif // V8_ARM64_LITHIUM_ARM64_H_ | 3268 #endif // V8_ARM64_LITHIUM_ARM64_H_ |
| OLD | NEW |