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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 PrologEmitsFixedAllocas = true; | 105 PrologEmitsFixedAllocas = true; |
106 } | 106 } |
107 int32_t getFrameFixedAllocaOffset() const override { | 107 int32_t getFrameFixedAllocaOffset() const override { |
108 int32_t FixedAllocaOffset = | 108 int32_t FixedAllocaOffset = |
109 Utils::applyAlignment(CurrentAllocaOffset, FixedAllocaAlignBytes); | 109 Utils::applyAlignment(CurrentAllocaOffset, FixedAllocaAlignBytes); |
110 return FixedAllocaOffset - MaxOutArgsSizeBytes; | 110 return FixedAllocaOffset - MaxOutArgsSizeBytes; |
111 } | 111 } |
112 | 112 |
113 uint32_t maxOutArgsSizeBytes() const override { return MaxOutArgsSizeBytes; } | 113 uint32_t maxOutArgsSizeBytes() const override { return MaxOutArgsSizeBytes; } |
114 | 114 |
| 115 uint32_t getOffset(uint32_t CurrentOffset, uint32_t Size) const override { |
| 116 (void)Size; |
| 117 return CurrentOffset + MaxOutArgsSizeBytes; |
| 118 } |
| 119 |
115 bool shouldSplitToVariable64On32(Type Ty) const override { | 120 bool shouldSplitToVariable64On32(Type Ty) const override { |
116 return Ty == IceType_i64; | 121 return Ty == IceType_i64; |
117 } | 122 } |
118 | 123 |
119 bool shouldSplitToVariableVecOn32(Type Ty) const override { | 124 bool shouldSplitToVariableVecOn32(Type Ty) const override { |
120 return isVectorType(Ty); | 125 return isVectorType(Ty); |
121 } | 126 } |
122 | 127 |
123 // TODO(ascull): what is the best size of MIPS? | 128 // TODO(ascull): what is the best size of MIPS? |
124 SizeT getMinJumpTableSize() const override { return 3; } | 129 SizeT getMinJumpTableSize() const override { return 3; } |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 | 606 |
602 public: | 607 public: |
603 explicit Sandboxer( | 608 explicit Sandboxer( |
604 TargetMIPS32 *Target, | 609 TargetMIPS32 *Target, |
605 InstBundleLock::Option BundleOption = InstBundleLock::Opt_None); | 610 InstBundleLock::Option BundleOption = InstBundleLock::Opt_None); |
606 ~Sandboxer(); | 611 ~Sandboxer(); |
607 | 612 |
608 void addiu_sp(uint32_t StackOffset); | 613 void addiu_sp(uint32_t StackOffset); |
609 void lw(Variable *Dest, OperandMIPS32Mem *Mem); | 614 void lw(Variable *Dest, OperandMIPS32Mem *Mem); |
610 void sw(Variable *Dest, OperandMIPS32Mem *Mem); | 615 void sw(Variable *Dest, OperandMIPS32Mem *Mem); |
| 616 void ll(Variable *Dest, OperandMIPS32Mem *Mem); |
| 617 void sc(Variable *Dest, OperandMIPS32Mem *Mem); |
611 void lwc1(Variable *Dest, OperandMIPS32Mem *Mem, RelocOp Reloc = RO_No); | 618 void lwc1(Variable *Dest, OperandMIPS32Mem *Mem, RelocOp Reloc = RO_No); |
612 void ldc1(Variable *Dest, OperandMIPS32Mem *Mem, RelocOp Reloc = RO_No); | 619 void ldc1(Variable *Dest, OperandMIPS32Mem *Mem, RelocOp Reloc = RO_No); |
613 void ret(Variable *RetAddr, Variable *RetValue); | 620 void ret(Variable *RetAddr, Variable *RetValue); |
614 void reset_sp(Variable *Src); | 621 void reset_sp(Variable *Src); |
615 InstMIPS32Call *jal(Variable *ReturnReg, Operand *CallTarget); | 622 InstMIPS32Call *jal(Variable *ReturnReg, Operand *CallTarget); |
616 | 623 |
617 private: | 624 private: |
618 TargetMIPS32 *const Target; | 625 TargetMIPS32 *const Target; |
619 const InstBundleLock::Option BundleOption; | 626 const InstBundleLock::Option BundleOption; |
620 std::unique_ptr<AutoBundle> Bundler; | 627 std::unique_ptr<AutoBundle> Bundler; |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 uint32_t Flags1 = AFL_FLAGS1_ODDSPREG; | 1053 uint32_t Flags1 = AFL_FLAGS1_ODDSPREG; |
1047 uint32_t Flags2 = AFL_FLAGS2_NONE; | 1054 uint32_t Flags2 = AFL_FLAGS2_NONE; |
1048 | 1055 |
1049 MipsABIFlagsSection() = default; | 1056 MipsABIFlagsSection() = default; |
1050 }; | 1057 }; |
1051 | 1058 |
1052 } // end of namespace MIPS32 | 1059 } // end of namespace MIPS32 |
1053 } // end of namespace Ice | 1060 } // end of namespace Ice |
1054 | 1061 |
1055 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H | 1062 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H |
OLD | NEW |