OLD | NEW |
1 //===- subzero/src/IceInstX86Base.h - Generic x86 instructions -*- C++ -*--===// | 1 //===- subzero/src/IceInstX86Base.h - Generic x86 instructions -*- 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 class InstX86Label final : public InstX86Base { | 325 class InstX86Label final : public InstX86Base { |
326 InstX86Label() = delete; | 326 InstX86Label() = delete; |
327 InstX86Label(const InstX86Label &) = delete; | 327 InstX86Label(const InstX86Label &) = delete; |
328 InstX86Label &operator=(const InstX86Label &) = delete; | 328 InstX86Label &operator=(const InstX86Label &) = delete; |
329 | 329 |
330 public: | 330 public: |
331 static InstX86Label *create(Cfg *Func, TargetLowering *Target) { | 331 static InstX86Label *create(Cfg *Func, TargetLowering *Target) { |
332 return new (Func->allocate<InstX86Label>()) InstX86Label(Func, Target); | 332 return new (Func->allocate<InstX86Label>()) InstX86Label(Func, Target); |
333 } | 333 } |
334 uint32_t getEmitInstCount() const override { return 0; } | 334 uint32_t getEmitInstCount() const override { return 0; } |
335 IceString getName(const Cfg *Func) const; | 335 GlobalString getLabelName() const { return Name; } |
336 SizeT getNumber() const { return Number; } | 336 SizeT getLabelNumber() const { return LabelNumber; } |
337 void emit(const Cfg *Func) const override; | 337 void emit(const Cfg *Func) const override; |
338 void emitIAS(const Cfg *Func) const override; | 338 void emitIAS(const Cfg *Func) const override; |
339 void dump(const Cfg *Func) const override; | 339 void dump(const Cfg *Func) const override; |
340 void setRelocOffset(RelocOffset *Value) { OffsetReloc = Value; } | 340 void setRelocOffset(RelocOffset *Value) { OffsetReloc = Value; } |
341 | 341 |
342 private: | 342 private: |
343 InstX86Label(Cfg *Func, TargetLowering *Target); | 343 InstX86Label(Cfg *Func, TargetLowering *Target); |
344 | 344 |
345 SizeT Number; // used for unique label generation. | 345 SizeT LabelNumber; // used for unique label generation. |
346 RelocOffset *OffsetReloc = nullptr; | 346 RelocOffset *OffsetReloc = nullptr; |
| 347 GlobalString Name; |
347 }; | 348 }; |
348 | 349 |
349 /// Conditional and unconditional branch instruction. | 350 /// Conditional and unconditional branch instruction. |
350 class InstX86Br final : public InstX86Base { | 351 class InstX86Br final : public InstX86Base { |
351 InstX86Br() = delete; | 352 InstX86Br() = delete; |
352 InstX86Br(const InstX86Br &) = delete; | 353 InstX86Br(const InstX86Br &) = delete; |
353 InstX86Br &operator=(const InstX86Br &) = delete; | 354 InstX86Br &operator=(const InstX86Br &) = delete; |
354 | 355 |
355 public: | 356 public: |
356 enum Mode { Near, Far }; | 357 enum Mode { Near, Far }; |
(...skipping 3171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3528 &InstImpl<TraitsType>::Assembler::psrl}; \ | 3529 &InstImpl<TraitsType>::Assembler::psrl}; \ |
3529 } \ | 3530 } \ |
3530 } | 3531 } |
3531 | 3532 |
3532 } // end of namespace X86NAMESPACE | 3533 } // end of namespace X86NAMESPACE |
3533 } // end of namespace Ice | 3534 } // end of namespace Ice |
3534 | 3535 |
3535 #include "IceInstX86BaseImpl.h" | 3536 #include "IceInstX86BaseImpl.h" |
3536 | 3537 |
3537 #endif // SUBZERO_SRC_ICEINSTX86BASE_H | 3538 #endif // SUBZERO_SRC_ICEINSTX86BASE_H |
OLD | NEW |