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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 Legal_Reg = 1 << 0, // physical register, not stack location | 110 Legal_Reg = 1 << 0, // physical register, not stack location |
111 Legal_Flex = 1 << 1, // A flexible operand2, which can hold rotated | 111 Legal_Flex = 1 << 1, // A flexible operand2, which can hold rotated |
112 // small immediates, or shifted registers. | 112 // small immediates, or shifted registers. |
113 Legal_Mem = 1 << 2, // includes [r0, r1 lsl #2] as well as [sp, #12] | 113 Legal_Mem = 1 << 2, // includes [r0, r1 lsl #2] as well as [sp, #12] |
114 Legal_All = ~Legal_None | 114 Legal_All = ~Legal_None |
115 }; | 115 }; |
116 typedef uint32_t LegalMask; | 116 typedef uint32_t LegalMask; |
117 Operand *legalize(Operand *From, LegalMask Allowed = Legal_All, | 117 Operand *legalize(Operand *From, LegalMask Allowed = Legal_All, |
118 int32_t RegNum = Variable::NoRegister); | 118 int32_t RegNum = Variable::NoRegister); |
119 Variable *legalizeToVar(Operand *From, int32_t RegNum = Variable::NoRegister); | 119 Variable *legalizeToVar(Operand *From, int32_t RegNum = Variable::NoRegister); |
| 120 OperandARM32Mem *formMemoryOperand(Operand *Ptr, Type Ty); |
120 | 121 |
121 Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister); | 122 Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister); |
122 static Type stackSlotType(); | 123 static Type stackSlotType(); |
123 Variable *copyToReg(Operand *Src, int32_t RegNum = Variable::NoRegister); | 124 Variable *copyToReg(Operand *Src, int32_t RegNum = Variable::NoRegister); |
124 void alignRegisterPow2(Variable *Reg, uint32_t Align); | 125 void alignRegisterPow2(Variable *Reg, uint32_t Align); |
125 | 126 |
126 // Returns a vector in a register with the given constant entries. | 127 // Returns a vector in a register with the given constant entries. |
127 Variable *makeVectorOfZeros(Type Ty, int32_t RegNum = Variable::NoRegister); | 128 Variable *makeVectorOfZeros(Type Ty, int32_t RegNum = Variable::NoRegister); |
128 | 129 |
129 void makeRandomRegisterPermutation( | 130 void makeRandomRegisterPermutation( |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 void _sbc(Variable *Dest, Variable *Src0, Operand *Src1, | 235 void _sbc(Variable *Dest, Variable *Src0, Operand *Src1, |
235 CondARM32::Cond Pred = CondARM32::AL) { | 236 CondARM32::Cond Pred = CondARM32::AL) { |
236 Context.insert(InstARM32Sbc::create(Func, Dest, Src0, Src1, Pred)); | 237 Context.insert(InstARM32Sbc::create(Func, Dest, Src0, Src1, Pred)); |
237 } | 238 } |
238 void _sbcs(Variable *Dest, Variable *Src0, Operand *Src1, | 239 void _sbcs(Variable *Dest, Variable *Src0, Operand *Src1, |
239 CondARM32::Cond Pred = CondARM32::AL) { | 240 CondARM32::Cond Pred = CondARM32::AL) { |
240 const bool SetFlags = true; | 241 const bool SetFlags = true; |
241 Context.insert( | 242 Context.insert( |
242 InstARM32Sbc::create(Func, Dest, Src0, Src1, Pred, SetFlags)); | 243 InstARM32Sbc::create(Func, Dest, Src0, Src1, Pred, SetFlags)); |
243 } | 244 } |
| 245 void _str(Variable *Value, OperandARM32Mem *Addr, |
| 246 CondARM32::Cond Pred = CondARM32::AL) { |
| 247 Context.insert(InstARM32Str::create(Func, Value, Addr, Pred)); |
| 248 } |
244 void _sub(Variable *Dest, Variable *Src0, Operand *Src1, | 249 void _sub(Variable *Dest, Variable *Src0, Operand *Src1, |
245 CondARM32::Cond Pred = CondARM32::AL) { | 250 CondARM32::Cond Pred = CondARM32::AL) { |
246 Context.insert(InstARM32Sub::create(Func, Dest, Src0, Src1, Pred)); | 251 Context.insert(InstARM32Sub::create(Func, Dest, Src0, Src1, Pred)); |
247 } | 252 } |
248 void _subs(Variable *Dest, Variable *Src0, Operand *Src1, | 253 void _subs(Variable *Dest, Variable *Src0, Operand *Src1, |
249 CondARM32::Cond Pred = CondARM32::AL) { | 254 CondARM32::Cond Pred = CondARM32::AL) { |
250 const bool SetFlags = true; | 255 const bool SetFlags = true; |
251 Context.insert( | 256 Context.insert( |
252 InstARM32Sub::create(Func, Dest, Src0, Src1, Pred, SetFlags)); | 257 InstARM32Sub::create(Func, Dest, Src0, Src1, Pred, SetFlags)); |
253 } | 258 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 | 300 |
296 private: | 301 private: |
297 void lowerGlobal(const VariableDeclaration &Var) const; | 302 void lowerGlobal(const VariableDeclaration &Var) const; |
298 ~TargetDataARM32() override {} | 303 ~TargetDataARM32() override {} |
299 template <typename T> static void emitConstantPool(GlobalContext *Ctx); | 304 template <typename T> static void emitConstantPool(GlobalContext *Ctx); |
300 }; | 305 }; |
301 | 306 |
302 } // end of namespace Ice | 307 } // end of namespace Ice |
303 | 308 |
304 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H | 309 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H |
OLD | NEW |