| 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 /// \file | 10 /// \file |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 Context.insert(InstARM32Br::create(Func, Label, Condition)); | 234 Context.insert(InstARM32Br::create(Func, Label, Condition)); |
| 235 } | 235 } |
| 236 void _cmp(Variable *Src0, Operand *Src1, | 236 void _cmp(Variable *Src0, Operand *Src1, |
| 237 CondARM32::Cond Pred = CondARM32::AL) { | 237 CondARM32::Cond Pred = CondARM32::AL) { |
| 238 Context.insert(InstARM32Cmp::create(Func, Src0, Src1, Pred)); | 238 Context.insert(InstARM32Cmp::create(Func, Src0, Src1, Pred)); |
| 239 } | 239 } |
| 240 void _clz(Variable *Dest, Variable *Src0, | 240 void _clz(Variable *Dest, Variable *Src0, |
| 241 CondARM32::Cond Pred = CondARM32::AL) { | 241 CondARM32::Cond Pred = CondARM32::AL) { |
| 242 Context.insert(InstARM32Clz::create(Func, Dest, Src0, Pred)); | 242 Context.insert(InstARM32Clz::create(Func, Dest, Src0, Pred)); |
| 243 } | 243 } |
| 244 void _dmb() { Context.insert(InstARM32Dmb::create(Func)); } |
| 244 void _eor(Variable *Dest, Variable *Src0, Operand *Src1, | 245 void _eor(Variable *Dest, Variable *Src0, Operand *Src1, |
| 245 CondARM32::Cond Pred = CondARM32::AL) { | 246 CondARM32::Cond Pred = CondARM32::AL) { |
| 246 Context.insert(InstARM32Eor::create(Func, Dest, Src0, Src1, Pred)); | 247 Context.insert(InstARM32Eor::create(Func, Dest, Src0, Src1, Pred)); |
| 247 } | 248 } |
| 248 /// _ldr, for all your memory to Variable data moves. It handles all types | 249 /// _ldr, for all your memory to Variable data moves. It handles all types |
| 249 /// (integer, floating point, and vectors.) Addr needs to be valid for Dest's | 250 /// (integer, floating point, and vectors.) Addr needs to be valid for Dest's |
| 250 /// type (e.g., no immediates for vector loads, and no index registers for fp | 251 /// type (e.g., no immediates for vector loads, and no index registers for fp |
| 251 /// loads.) | 252 /// loads.) |
| 252 void _ldr(Variable *Dest, OperandARM32Mem *Addr, | 253 void _ldr(Variable *Dest, OperandARM32Mem *Addr, |
| 253 CondARM32::Cond Pred = CondARM32::AL) { | 254 CondARM32::Cond Pred = CondARM32::AL) { |
| 254 Context.insert(InstARM32Ldr::create(Func, Dest, Addr, Pred)); | 255 Context.insert(InstARM32Ldr::create(Func, Dest, Addr, Pred)); |
| 255 } | 256 } |
| 257 void _ldrex(Variable *Dest, OperandARM32Mem *Addr, |
| 258 CondARM32::Cond Pred = CondARM32::AL) { |
| 259 Context.insert(InstARM32Ldrex::create(Func, Dest, Addr, Pred)); |
| 260 if (auto *Dest64 = llvm::dyn_cast<Variable64On32>(Dest)) { |
| 261 Context.insert(InstFakeDef::create(Func, Dest64->getLo(), Dest)); |
| 262 Context.insert(InstFakeDef::create(Func, Dest64->getHi(), Dest)); |
| 263 } |
| 264 } |
| 256 void _lsl(Variable *Dest, Variable *Src0, Operand *Src1, | 265 void _lsl(Variable *Dest, Variable *Src0, Operand *Src1, |
| 257 CondARM32::Cond Pred = CondARM32::AL) { | 266 CondARM32::Cond Pred = CondARM32::AL) { |
| 258 Context.insert(InstARM32Lsl::create(Func, Dest, Src0, Src1, Pred)); | 267 Context.insert(InstARM32Lsl::create(Func, Dest, Src0, Src1, Pred)); |
| 259 } | 268 } |
| 260 void _lsr(Variable *Dest, Variable *Src0, Operand *Src1, | 269 void _lsr(Variable *Dest, Variable *Src0, Operand *Src1, |
| 261 CondARM32::Cond Pred = CondARM32::AL) { | 270 CondARM32::Cond Pred = CondARM32::AL) { |
| 262 Context.insert(InstARM32Lsr::create(Func, Dest, Src0, Src1, Pred)); | 271 Context.insert(InstARM32Lsr::create(Func, Dest, Src0, Src1, Pred)); |
| 263 } | 272 } |
| 264 void _mla(Variable *Dest, Variable *Src0, Variable *Src1, Variable *Acc, | 273 void _mla(Variable *Dest, Variable *Src0, Variable *Src1, Variable *Acc, |
| 265 CondARM32::Cond Pred = CondARM32::AL) { | 274 CondARM32::Cond Pred = CondARM32::AL) { |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 void _sdiv(Variable *Dest, Variable *Src0, Variable *Src1, | 376 void _sdiv(Variable *Dest, Variable *Src0, Variable *Src1, |
| 368 CondARM32::Cond Pred = CondARM32::AL) { | 377 CondARM32::Cond Pred = CondARM32::AL) { |
| 369 Context.insert(InstARM32Sdiv::create(Func, Dest, Src0, Src1, Pred)); | 378 Context.insert(InstARM32Sdiv::create(Func, Dest, Src0, Src1, Pred)); |
| 370 } | 379 } |
| 371 /// _str, for all your Variable to memory transfers. Addr has the same | 380 /// _str, for all your Variable to memory transfers. Addr has the same |
| 372 /// restrictions that it does in _ldr. | 381 /// restrictions that it does in _ldr. |
| 373 void _str(Variable *Value, OperandARM32Mem *Addr, | 382 void _str(Variable *Value, OperandARM32Mem *Addr, |
| 374 CondARM32::Cond Pred = CondARM32::AL) { | 383 CondARM32::Cond Pred = CondARM32::AL) { |
| 375 Context.insert(InstARM32Str::create(Func, Value, Addr, Pred)); | 384 Context.insert(InstARM32Str::create(Func, Value, Addr, Pred)); |
| 376 } | 385 } |
| 386 void _strex(Variable *Dest, Variable *Value, OperandARM32Mem *Addr, |
| 387 CondARM32::Cond Pred = CondARM32::AL) { |
| 388 if (auto *Value64 = llvm::dyn_cast<Variable64On32>(Value)) { |
| 389 Context.insert(InstFakeUse::create(Func, Value64->getLo())); |
| 390 Context.insert(InstFakeUse::create(Func, Value64->getHi())); |
| 391 } |
| 392 Context.insert(InstARM32Strex::create(Func, Dest, Value, Addr, Pred)); |
| 393 } |
| 377 void _sub(Variable *Dest, Variable *Src0, Operand *Src1, | 394 void _sub(Variable *Dest, Variable *Src0, Operand *Src1, |
| 378 CondARM32::Cond Pred = CondARM32::AL) { | 395 CondARM32::Cond Pred = CondARM32::AL) { |
| 379 Context.insert(InstARM32Sub::create(Func, Dest, Src0, Src1, Pred)); | 396 Context.insert(InstARM32Sub::create(Func, Dest, Src0, Src1, Pred)); |
| 380 } | 397 } |
| 381 void _subs(Variable *Dest, Variable *Src0, Operand *Src1, | 398 void _subs(Variable *Dest, Variable *Src0, Operand *Src1, |
| 382 CondARM32::Cond Pred = CondARM32::AL) { | 399 CondARM32::Cond Pred = CondARM32::AL) { |
| 383 constexpr bool SetFlags = true; | 400 constexpr bool SetFlags = true; |
| 384 Context.insert( | 401 Context.insert( |
| 385 InstARM32Sub::create(Func, Dest, Src0, Src1, Pred, SetFlags)); | 402 InstARM32Sub::create(Func, Dest, Src0, Src1, Pred, SetFlags)); |
| 386 } | 403 } |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 | 572 |
| 556 private: | 573 private: |
| 557 ~TargetHeaderARM32() = default; | 574 ~TargetHeaderARM32() = default; |
| 558 | 575 |
| 559 TargetARM32Features CPUFeatures; | 576 TargetARM32Features CPUFeatures; |
| 560 }; | 577 }; |
| 561 | 578 |
| 562 } // end of namespace Ice | 579 } // end of namespace Ice |
| 563 | 580 |
| 564 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H | 581 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H |
| OLD | NEW |