| OLD | NEW |
| 1 //===- subzero/src/IceInstARM32.cpp - ARM32 instruction implementation ----===// | 1 //===- subzero/src/IceInstARM32.cpp - ARM32 instruction implementation ----===// |
| 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 Found = true; | 337 Found = true; |
| 338 } | 338 } |
| 339 return Found; | 339 return Found; |
| 340 } | 340 } |
| 341 | 341 |
| 342 template <InstARM32::InstKindARM32 K> | 342 template <InstARM32::InstKindARM32 K> |
| 343 void InstARM32ThreeAddrGPR<K>::emitIAS(const Cfg *Func) const { | 343 void InstARM32ThreeAddrGPR<K>::emitIAS(const Cfg *Func) const { |
| 344 emitUsingTextFixup(Func); | 344 emitUsingTextFixup(Func); |
| 345 } | 345 } |
| 346 | 346 |
| 347 template <> | 347 template <> void InstARM32Adc::emitIAS(const Cfg *Func) const { |
| 348 void InstARM32ThreeAddrGPR<InstARM32::Adc>::emitIAS(const Cfg *Func) const { | |
| 349 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 348 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
| 350 Asm->adc(getDest(), getSrc(0), getSrc(1), SetFlags, getPredicate()); | 349 Asm->adc(getDest(), getSrc(0), getSrc(1), SetFlags, getPredicate()); |
| 351 if (Asm->needsTextFixup()) | 350 if (Asm->needsTextFixup()) |
| 352 emitUsingTextFixup(Func); | 351 emitUsingTextFixup(Func); |
| 353 } | 352 } |
| 354 | 353 |
| 355 template <> | 354 template <> void InstARM32Add::emitIAS(const Cfg *Func) const { |
| 356 void InstARM32ThreeAddrGPR<InstARM32::Add>::emitIAS(const Cfg *Func) const { | |
| 357 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 355 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
| 358 Asm->add(getDest(), getSrc(0), getSrc(1), SetFlags, getPredicate()); | 356 Asm->add(getDest(), getSrc(0), getSrc(1), SetFlags, getPredicate()); |
| 359 if (Asm->needsTextFixup()) | 357 if (Asm->needsTextFixup()) |
| 360 emitUsingTextFixup(Func); | 358 emitUsingTextFixup(Func); |
| 361 } | 359 } |
| 362 | 360 |
| 363 template <> void InstARM32And::emitIAS(const Cfg *Func) const { | 361 template <> void InstARM32And::emitIAS(const Cfg *Func) const { |
| 364 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 362 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
| 365 Asm->and_(getDest(), getSrc(0), getSrc(1), SetFlags, getPredicate()); | 363 Asm->and_(getDest(), getSrc(0), getSrc(1), SetFlags, getPredicate()); |
| 366 if (Asm->needsTextFixup()) | 364 if (Asm->needsTextFixup()) |
| 367 emitUsingTextFixup(Func); | 365 emitUsingTextFixup(Func); |
| 368 } | 366 } |
| 369 | 367 |
| 370 template <> | 368 template <> void InstARM32Mul::emitIAS(const Cfg *Func) const { |
| 371 void InstARM32ThreeAddrGPR<InstARM32::Sbc>::emitIAS(const Cfg *Func) const { | 369 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
| 370 Asm->mul(getDest(), getSrc(0), getSrc(1), SetFlags, getPredicate()); |
| 371 if (Asm->needsTextFixup()) |
| 372 emitUsingTextFixup(Func); |
| 373 } |
| 374 |
| 375 template <> void InstARM32Sbc::emitIAS(const Cfg *Func) const { |
| 372 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 376 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
| 373 Asm->sbc(getDest(), getSrc(0), getSrc(1), SetFlags, getPredicate()); | 377 Asm->sbc(getDest(), getSrc(0), getSrc(1), SetFlags, getPredicate()); |
| 374 if (Asm->needsTextFixup()) | 378 if (Asm->needsTextFixup()) |
| 375 emitUsingTextFixup(Func); | 379 emitUsingTextFixup(Func); |
| 376 } | 380 } |
| 377 | 381 |
| 378 template <> | 382 template <> void InstARM32Sub::emitIAS(const Cfg *Func) const { |
| 379 void InstARM32ThreeAddrGPR<InstARM32::Sub>::emitIAS(const Cfg *Func) const { | |
| 380 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 383 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
| 381 Asm->sub(getDest(), getSrc(0), getSrc(1), SetFlags, getPredicate()); | 384 Asm->sub(getDest(), getSrc(0), getSrc(1), SetFlags, getPredicate()); |
| 382 if (Asm->needsTextFixup()) | 385 if (Asm->needsTextFixup()) |
| 383 emitUsingTextFixup(Func); | 386 emitUsingTextFixup(Func); |
| 384 } | 387 } |
| 385 | 388 |
| 386 InstARM32Call::InstARM32Call(Cfg *Func, Variable *Dest, Operand *CallTarget) | 389 InstARM32Call::InstARM32Call(Cfg *Func, Variable *Dest, Operand *CallTarget) |
| 387 : InstARM32(Func, InstARM32::Call, 1, Dest) { | 390 : InstARM32(Func, InstARM32::Call, 1, Dest) { |
| 388 HasSideEffects = true; | 391 HasSideEffects = true; |
| 389 addSource(CallTarget); | 392 addSource(CallTarget); |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 template class InstARM32UnaryopGPR<InstARM32::Movw, false>; | 1496 template class InstARM32UnaryopGPR<InstARM32::Movw, false>; |
| 1494 template class InstARM32UnaryopGPR<InstARM32::Clz, false>; | 1497 template class InstARM32UnaryopGPR<InstARM32::Clz, false>; |
| 1495 template class InstARM32UnaryopGPR<InstARM32::Mvn, false>; | 1498 template class InstARM32UnaryopGPR<InstARM32::Mvn, false>; |
| 1496 template class InstARM32UnaryopGPR<InstARM32::Rbit, false>; | 1499 template class InstARM32UnaryopGPR<InstARM32::Rbit, false>; |
| 1497 template class InstARM32UnaryopGPR<InstARM32::Rev, false>; | 1500 template class InstARM32UnaryopGPR<InstARM32::Rev, false>; |
| 1498 template class InstARM32UnaryopGPR<InstARM32::Sxt, true>; | 1501 template class InstARM32UnaryopGPR<InstARM32::Sxt, true>; |
| 1499 template class InstARM32UnaryopGPR<InstARM32::Uxt, true>; | 1502 template class InstARM32UnaryopGPR<InstARM32::Uxt, true>; |
| 1500 template class InstARM32UnaryopFP<InstARM32::Vsqrt>; | 1503 template class InstARM32UnaryopFP<InstARM32::Vsqrt>; |
| 1501 | 1504 |
| 1502 } // end of namespace Ice | 1505 } // end of namespace Ice |
| OLD | NEW |