OLD | NEW |
1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 lowering ----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 lowering ----*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file declares the TargetLoweringARM32 class, which implements the | 10 // This file declares the TargetLoweringARM32 class, which implements the |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 Legal_All = ~Legal_None | 111 Legal_All = ~Legal_None |
112 }; | 112 }; |
113 typedef uint32_t LegalMask; | 113 typedef uint32_t LegalMask; |
114 Operand *legalize(Operand *From, LegalMask Allowed = Legal_All, | 114 Operand *legalize(Operand *From, LegalMask Allowed = Legal_All, |
115 int32_t RegNum = Variable::NoRegister); | 115 int32_t RegNum = Variable::NoRegister); |
116 Variable *legalizeToVar(Operand *From, int32_t RegNum = Variable::NoRegister); | 116 Variable *legalizeToVar(Operand *From, int32_t RegNum = Variable::NoRegister); |
117 | 117 |
118 Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister); | 118 Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister); |
119 static Type stackSlotType(); | 119 static Type stackSlotType(); |
120 Variable *copyToReg(Operand *Src, int32_t RegNum = Variable::NoRegister); | 120 Variable *copyToReg(Operand *Src, int32_t RegNum = Variable::NoRegister); |
| 121 void alignRegisterPow2(Variable *Reg, uint32_t Align); |
121 | 122 |
122 // Returns a vector in a register with the given constant entries. | 123 // Returns a vector in a register with the given constant entries. |
123 Variable *makeVectorOfZeros(Type Ty, int32_t RegNum = Variable::NoRegister); | 124 Variable *makeVectorOfZeros(Type Ty, int32_t RegNum = Variable::NoRegister); |
124 | 125 |
125 void makeRandomRegisterPermutation( | 126 void makeRandomRegisterPermutation( |
126 llvm::SmallVectorImpl<int32_t> &Permutation, | 127 llvm::SmallVectorImpl<int32_t> &Permutation, |
127 const llvm::SmallBitVector &ExcludeRegisters) const override; | 128 const llvm::SmallBitVector &ExcludeRegisters) const override; |
128 | 129 |
129 // The following are helpers that insert lowered ARM32 instructions | 130 // The following are helpers that insert lowered ARM32 instructions |
130 // with minimal syntactic overhead, so that the lowering code can | 131 // with minimal syntactic overhead, so that the lowering code can |
(...skipping 10 matching lines...) Expand all Loading... |
141 InstARM32Add::create(Func, Dest, Src0, Src1, Pred, SetFlags)); | 142 InstARM32Add::create(Func, Dest, Src0, Src1, Pred, SetFlags)); |
142 } | 143 } |
143 void _adc(Variable *Dest, Variable *Src0, Operand *Src1, | 144 void _adc(Variable *Dest, Variable *Src0, Operand *Src1, |
144 CondARM32::Cond Pred = CondARM32::AL) { | 145 CondARM32::Cond Pred = CondARM32::AL) { |
145 Context.insert(InstARM32Adc::create(Func, Dest, Src0, Src1, Pred)); | 146 Context.insert(InstARM32Adc::create(Func, Dest, Src0, Src1, Pred)); |
146 } | 147 } |
147 void _and(Variable *Dest, Variable *Src0, Operand *Src1, | 148 void _and(Variable *Dest, Variable *Src0, Operand *Src1, |
148 CondARM32::Cond Pred = CondARM32::AL) { | 149 CondARM32::Cond Pred = CondARM32::AL) { |
149 Context.insert(InstARM32And::create(Func, Dest, Src0, Src1, Pred)); | 150 Context.insert(InstARM32And::create(Func, Dest, Src0, Src1, Pred)); |
150 } | 151 } |
| 152 void _bic(Variable *Dest, Variable *Src0, Operand *Src1, |
| 153 CondARM32::Cond Pred = CondARM32::AL) { |
| 154 Context.insert(InstARM32Bic::create(Func, Dest, Src0, Src1, Pred)); |
| 155 } |
151 void _br(CondARM32::Cond Condition, CfgNode *TargetTrue, | 156 void _br(CondARM32::Cond Condition, CfgNode *TargetTrue, |
152 CfgNode *TargetFalse) { | 157 CfgNode *TargetFalse) { |
153 Context.insert( | 158 Context.insert( |
154 InstARM32Br::create(Func, TargetTrue, TargetFalse, Condition)); | 159 InstARM32Br::create(Func, TargetTrue, TargetFalse, Condition)); |
155 } | 160 } |
156 void _br(CfgNode *Target) { | 161 void _br(CfgNode *Target) { |
157 Context.insert(InstARM32Br::create(Func, Target)); | 162 Context.insert(InstARM32Br::create(Func, Target)); |
158 } | 163 } |
159 void _cmp(Variable *Src0, Operand *Src1, | 164 void _cmp(Variable *Src0, Operand *Src1, |
160 CondARM32::Cond Pred = CondARM32::AL) { | 165 CondARM32::Cond Pred = CondARM32::AL) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 281 |
277 private: | 282 private: |
278 void lowerGlobal(const VariableDeclaration &Var) const; | 283 void lowerGlobal(const VariableDeclaration &Var) const; |
279 ~TargetDataARM32() override {} | 284 ~TargetDataARM32() override {} |
280 template <typename T> static void emitConstantPool(GlobalContext *Ctx); | 285 template <typename T> static void emitConstantPool(GlobalContext *Ctx); |
281 }; | 286 }; |
282 | 287 |
283 } // end of namespace Ice | 288 } // end of namespace Ice |
284 | 289 |
285 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H | 290 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H |
OLD | NEW |