| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 143 } |
| 144 | 144 |
| 145 void _addu(Variable *Dest, Variable *Src0, Variable *Src1) { | 145 void _addu(Variable *Dest, Variable *Src0, Variable *Src1) { |
| 146 Context.insert<InstMIPS32Addu>(Dest, Src0, Src1); | 146 Context.insert<InstMIPS32Addu>(Dest, Src0, Src1); |
| 147 } | 147 } |
| 148 | 148 |
| 149 void _and(Variable *Dest, Variable *Src0, Variable *Src1) { | 149 void _and(Variable *Dest, Variable *Src0, Variable *Src1) { |
| 150 Context.insert<InstMIPS32And>(Dest, Src0, Src1); | 150 Context.insert<InstMIPS32And>(Dest, Src0, Src1); |
| 151 } | 151 } |
| 152 | 152 |
| 153 void _andi(Variable *Dest, Variable *Src, uint32_t Imm) { |
| 154 Context.insert<InstMIPS32Andi>(Dest, Src, Imm); |
| 155 } |
| 156 |
| 153 void _br(CfgNode *Target) { Context.insert<InstMIPS32Br>(Target); } | 157 void _br(CfgNode *Target) { Context.insert<InstMIPS32Br>(Target); } |
| 154 | 158 |
| 155 void _ret(Variable *RA, Variable *Src0 = nullptr) { | 159 void _ret(Variable *RA, Variable *Src0 = nullptr) { |
| 156 Context.insert<InstMIPS32Ret>(RA, Src0); | 160 Context.insert<InstMIPS32Ret>(RA, Src0); |
| 157 } | 161 } |
| 158 | 162 |
| 159 void _addiu(Variable *Dest, Variable *Src, uint32_t Imm) { | 163 void _addiu(Variable *Dest, Variable *Src, uint32_t Imm) { |
| 160 Context.insert<InstMIPS32Addiu>(Dest, Src, Imm); | 164 Context.insert<InstMIPS32Addiu>(Dest, Src, Imm); |
| 161 } | 165 } |
| 162 | 166 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 } | 213 } |
| 210 | 214 |
| 211 void _or(Variable *Dest, Variable *Src0, Variable *Src1) { | 215 void _or(Variable *Dest, Variable *Src0, Variable *Src1) { |
| 212 Context.insert<InstMIPS32Or>(Dest, Src0, Src1); | 216 Context.insert<InstMIPS32Or>(Dest, Src0, Src1); |
| 213 } | 217 } |
| 214 | 218 |
| 215 void _ori(Variable *Dest, Variable *Src, uint32_t Imm) { | 219 void _ori(Variable *Dest, Variable *Src, uint32_t Imm) { |
| 216 Context.insert<InstMIPS32Ori>(Dest, Src, Imm); | 220 Context.insert<InstMIPS32Ori>(Dest, Src, Imm); |
| 217 } | 221 } |
| 218 | 222 |
| 223 void _sll(Variable *Dest, Variable *Src, uint32_t Imm) { |
| 224 Context.insert<InstMIPS32Sll>(Dest, Src, Imm); |
| 225 } |
| 226 |
| 219 void _slt(Variable *Dest, Variable *Src0, Variable *Src1) { | 227 void _slt(Variable *Dest, Variable *Src0, Variable *Src1) { |
| 220 Context.insert<InstMIPS32Slt>(Dest, Src0, Src1); | 228 Context.insert<InstMIPS32Slt>(Dest, Src0, Src1); |
| 221 } | 229 } |
| 222 | 230 |
| 223 void _slti(Variable *Dest, Variable *Src, uint32_t Imm) { | 231 void _slti(Variable *Dest, Variable *Src, uint32_t Imm) { |
| 224 Context.insert<InstMIPS32Slti>(Dest, Src, Imm); | 232 Context.insert<InstMIPS32Slti>(Dest, Src, Imm); |
| 225 } | 233 } |
| 226 | 234 |
| 227 void _sltiu(Variable *Dest, Variable *Src, uint32_t Imm) { | 235 void _sltiu(Variable *Dest, Variable *Src, uint32_t Imm) { |
| 228 Context.insert<InstMIPS32Sltiu>(Dest, Src, Imm); | 236 Context.insert<InstMIPS32Sltiu>(Dest, Src, Imm); |
| 229 } | 237 } |
| 230 | 238 |
| 231 void _sltu(Variable *Dest, Variable *Src0, Variable *Src1) { | 239 void _sltu(Variable *Dest, Variable *Src0, Variable *Src1) { |
| 232 Context.insert<InstMIPS32Sltu>(Dest, Src0, Src1); | 240 Context.insert<InstMIPS32Sltu>(Dest, Src0, Src1); |
| 233 } | 241 } |
| 234 | 242 |
| 243 void _sra(Variable *Dest, Variable *Src, uint32_t Imm) { |
| 244 Context.insert<InstMIPS32Sra>(Dest, Src, Imm); |
| 245 } |
| 246 |
| 235 void _sub(Variable *Dest, Variable *Src0, Variable *Src1) { | 247 void _sub(Variable *Dest, Variable *Src0, Variable *Src1) { |
| 236 Context.insert<InstMIPS32Sub>(Dest, Src0, Src1); | 248 Context.insert<InstMIPS32Sub>(Dest, Src0, Src1); |
| 237 } | 249 } |
| 238 | 250 |
| 239 void _subu(Variable *Dest, Variable *Src0, Variable *Src1) { | 251 void _subu(Variable *Dest, Variable *Src0, Variable *Src1) { |
| 240 Context.insert<InstMIPS32Subu>(Dest, Src0, Src1); | 252 Context.insert<InstMIPS32Subu>(Dest, Src0, Src1); |
| 241 } | 253 } |
| 242 | 254 |
| 243 void _xor(Variable *Dest, Variable *Src0, Variable *Src1) { | 255 void _xor(Variable *Dest, Variable *Src0, Variable *Src1) { |
| 244 Context.insert<InstMIPS32Xor>(Dest, Src0, Src1); | 256 Context.insert<InstMIPS32Xor>(Dest, Src0, Src1); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 const SmallBitVector &ExcludeRegisters, | 351 const SmallBitVector &ExcludeRegisters, |
| 340 uint64_t Salt) const override; | 352 uint64_t Salt) const override; |
| 341 | 353 |
| 342 bool UsesFramePointer = false; | 354 bool UsesFramePointer = false; |
| 343 bool NeedsStackAlignment = false; | 355 bool NeedsStackAlignment = false; |
| 344 static SmallBitVector TypeToRegisterSet[RCMIPS32_NUM]; | 356 static SmallBitVector TypeToRegisterSet[RCMIPS32_NUM]; |
| 345 static SmallBitVector TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; | 357 static SmallBitVector TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; |
| 346 static SmallBitVector RegisterAliases[RegMIPS32::Reg_NUM]; | 358 static SmallBitVector RegisterAliases[RegMIPS32::Reg_NUM]; |
| 347 SmallBitVector RegsUsed; | 359 SmallBitVector RegsUsed; |
| 348 VarList PhysicalRegisters[IceType_NUM]; | 360 VarList PhysicalRegisters[IceType_NUM]; |
| 361 static constexpr uint32_t CHAR_BITS = 8; |
| 362 static constexpr uint32_t INT32_BITS = 32; |
| 349 | 363 |
| 350 private: | 364 private: |
| 351 ENABLE_MAKE_UNIQUE; | 365 ENABLE_MAKE_UNIQUE; |
| 352 }; | 366 }; |
| 353 | 367 |
| 354 class TargetDataMIPS32 final : public TargetDataLowering { | 368 class TargetDataMIPS32 final : public TargetDataLowering { |
| 355 TargetDataMIPS32() = delete; | 369 TargetDataMIPS32() = delete; |
| 356 TargetDataMIPS32(const TargetDataMIPS32 &) = delete; | 370 TargetDataMIPS32(const TargetDataMIPS32 &) = delete; |
| 357 TargetDataMIPS32 &operator=(const TargetDataMIPS32 &) = delete; | 371 TargetDataMIPS32 &operator=(const TargetDataMIPS32 &) = delete; |
| 358 | 372 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 explicit TargetHeaderMIPS32(GlobalContext *Ctx); | 404 explicit TargetHeaderMIPS32(GlobalContext *Ctx); |
| 391 | 405 |
| 392 private: | 406 private: |
| 393 ~TargetHeaderMIPS32() = default; | 407 ~TargetHeaderMIPS32() = default; |
| 394 }; | 408 }; |
| 395 | 409 |
| 396 } // end of namespace MIPS32 | 410 } // end of namespace MIPS32 |
| 397 } // end of namespace Ice | 411 } // end of namespace Ice |
| 398 | 412 |
| 399 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H | 413 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H |
| OLD | NEW |