| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringMIPS32.h - MIPS32 lowering ---*- C++-*-===// | 1 //===- subzero/src/IceTargetLoweringMIPS32.h - MIPS32 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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 void _xor(Variable *Dest, Variable *Src0, Variable *Src1) { | 573 void _xor(Variable *Dest, Variable *Src0, Variable *Src1) { |
| 574 Context.insert<InstMIPS32Xor>(Dest, Src0, Src1); | 574 Context.insert<InstMIPS32Xor>(Dest, Src0, Src1); |
| 575 } | 575 } |
| 576 | 576 |
| 577 void _xori(Variable *Dest, Variable *Src, uint32_t Imm) { | 577 void _xori(Variable *Dest, Variable *Src, uint32_t Imm) { |
| 578 Context.insert<InstMIPS32Xori>(Dest, Src, Imm); | 578 Context.insert<InstMIPS32Xori>(Dest, Src, Imm); |
| 579 } | 579 } |
| 580 | 580 |
| 581 void lowerArguments() override; | 581 void lowerArguments() override; |
| 582 | 582 |
| 583 class Sandboxer { |
| 584 Sandboxer() = delete; |
| 585 Sandboxer(const Sandboxer &) = delete; |
| 586 Sandboxer &operator=(const Sandboxer &) = delete; |
| 587 |
| 588 public: |
| 589 explicit Sandboxer( |
| 590 TargetMIPS32 *Target, |
| 591 InstBundleLock::Option BundleOption = InstBundleLock::Opt_None); |
| 592 ~Sandboxer(); |
| 593 |
| 594 void addiu_sp(uint32_t StackOffset); |
| 595 void lw(Variable *Dest, OperandMIPS32Mem *Mem); |
| 596 void sw(Variable *Dest, OperandMIPS32Mem *Mem); |
| 597 void lwc1(Variable *Dest, OperandMIPS32Mem *Mem, RelocOp Reloc = RO_No); |
| 598 void ldc1(Variable *Dest, OperandMIPS32Mem *Mem, RelocOp Reloc = RO_No); |
| 599 void ret(Variable *RetAddr, Variable *RetValue); |
| 600 void reset_sp(Variable *Src); |
| 601 InstMIPS32Call *jal(Variable *ReturnReg, Operand *CallTarget); |
| 602 |
| 603 private: |
| 604 TargetMIPS32 *const Target; |
| 605 const InstBundleLock::Option BundleOption; |
| 606 std::unique_ptr<AutoBundle> Bundler; |
| 607 |
| 608 void createAutoBundle(); |
| 609 }; |
| 610 |
| 611 const bool NeedSandboxing; |
| 612 |
| 583 /// Make a pass through the SortedSpilledVariables and actually assign stack | 613 /// Make a pass through the SortedSpilledVariables and actually assign stack |
| 584 /// slots. SpillAreaPaddingBytes takes into account stack alignment padding. | 614 /// slots. SpillAreaPaddingBytes takes into account stack alignment padding. |
| 585 /// The SpillArea starts after that amount of padding. This matches the scheme | 615 /// The SpillArea starts after that amount of padding. This matches the scheme |
| 586 /// in getVarStackSlotParams, where there may be a separate multi-block global | 616 /// in getVarStackSlotParams, where there may be a separate multi-block global |
| 587 /// var spill area and a local var spill area. | 617 /// var spill area and a local var spill area. |
| 588 void assignVarStackSlots(VarList &SortedSpilledVariables, | 618 void assignVarStackSlots(VarList &SortedSpilledVariables, |
| 589 size_t SpillAreaPaddingBytes, | 619 size_t SpillAreaPaddingBytes, |
| 590 size_t SpillAreaSizeBytes, | 620 size_t SpillAreaSizeBytes, |
| 591 size_t GlobalsAndSubsequentPaddingSize); | 621 size_t GlobalsAndSubsequentPaddingSize); |
| 592 | 622 |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 uint32_t Flags1 = AFL_FLAGS1_ODDSPREG; | 1030 uint32_t Flags1 = AFL_FLAGS1_ODDSPREG; |
| 1001 uint32_t Flags2 = AFL_FLAGS2_NONE; | 1031 uint32_t Flags2 = AFL_FLAGS2_NONE; |
| 1002 | 1032 |
| 1003 MipsABIFlagsSection() = default; | 1033 MipsABIFlagsSection() = default; |
| 1004 }; | 1034 }; |
| 1005 | 1035 |
| 1006 } // end of namespace MIPS32 | 1036 } // end of namespace MIPS32 |
| 1007 } // end of namespace Ice | 1037 } // end of namespace Ice |
| 1008 | 1038 |
| 1009 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H | 1039 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H |
| OLD | NEW |