OLD | NEW |
---|---|
1 //===- subzero/src/IceInstX8632.h - x86-32 machine instructions -*- C++ -*-===// | 1 //===- subzero/src/IceInstX8632.h - x86-32 machine 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 // This file declares the InstX8632 and OperandX8632 classes and | 10 // This file declares the InstX8632 and OperandX8632 classes and |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 void emitSegmentOverride(X8632::AssemblerX8632 *Asm) const; | 79 void emitSegmentOverride(X8632::AssemblerX8632 *Asm) const; |
80 X8632::Address toAsmAddress(Assembler *Asm) const; | 80 X8632::Address toAsmAddress(Assembler *Asm) const; |
81 void emit(const Cfg *Func) const override; | 81 void emit(const Cfg *Func) const override; |
82 using OperandX8632::dump; | 82 using OperandX8632::dump; |
83 void dump(const Cfg *Func, Ostream &Str) const override; | 83 void dump(const Cfg *Func, Ostream &Str) const override; |
84 | 84 |
85 static bool classof(const Operand *Operand) { | 85 static bool classof(const Operand *Operand) { |
86 return Operand->getKind() == static_cast<OperandKind>(kMem); | 86 return Operand->getKind() == static_cast<OperandKind>(kMem); |
87 } | 87 } |
88 | 88 |
89 void setRandomized(bool R) { Randomized = R; } | |
90 | |
91 bool getRandomize() { return Randomized; } | |
Jim Stichnoth
2015/06/20 17:42:16
Call this getRandomized() for consistency. Also d
qining
2015/06/20 23:32:37
Done.
Jim Stichnoth
2015/06/21 00:05:27
No -- it still isn't marked as const.
qining
2015/06/21 00:30:47
Oops, I'm so sorry I forgot to mark it const. It w
| |
92 | |
89 private: | 93 private: |
90 OperandX8632Mem(Cfg *Func, Type Ty, Variable *Base, Constant *Offset, | 94 OperandX8632Mem(Cfg *Func, Type Ty, Variable *Base, Constant *Offset, |
91 Variable *Index, uint16_t Shift, SegmentRegisters SegmentReg); | 95 Variable *Index, uint16_t Shift, SegmentRegisters SegmentReg); |
92 ~OperandX8632Mem() override {} | 96 ~OperandX8632Mem() override {} |
93 Variable *Base; | 97 Variable *Base; |
94 Constant *Offset; | 98 Constant *Offset; |
95 Variable *Index; | 99 Variable *Index; |
96 uint16_t Shift; | 100 uint16_t Shift; |
97 SegmentRegisters SegmentReg : 16; | 101 SegmentRegisters SegmentReg : 16; |
102 // A flag to show if this memory operand is a randomized one. | |
103 // Randomized memory operands are generated in | |
104 // TargetX8632::randomizeOrPoolImmediate() | |
105 bool Randomized; | |
98 }; | 106 }; |
99 | 107 |
100 // VariableSplit is a way to treat an f64 memory location as a pair | 108 // VariableSplit is a way to treat an f64 memory location as a pair |
101 // of i32 locations (Low and High). This is needed for some cases | 109 // of i32 locations (Low and High). This is needed for some cases |
102 // of the Bitcast instruction. Since it's not possible for integer | 110 // of the Bitcast instruction. Since it's not possible for integer |
103 // registers to access the XMM registers and vice versa, the | 111 // registers to access the XMM registers and vice versa, the |
104 // lowering forces the f64 to be spilled to the stack and then | 112 // lowering forces the f64 to be spilled to the stack and then |
105 // accesses through the VariableSplit. | 113 // accesses through the VariableSplit. |
106 class VariableSplit : public OperandX8632 { | 114 class VariableSplit : public OperandX8632 { |
107 VariableSplit() = delete; | 115 VariableSplit() = delete; |
(...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1801 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const; | 1809 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const; |
1802 template <> void InstX8632Movsx::emitIAS(const Cfg *Func) const; | 1810 template <> void InstX8632Movsx::emitIAS(const Cfg *Func) const; |
1803 template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const; | 1811 template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const; |
1804 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const; | 1812 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const; |
1805 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const; | 1813 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const; |
1806 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const; | 1814 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const; |
1807 | 1815 |
1808 } // end of namespace Ice | 1816 } // end of namespace Ice |
1809 | 1817 |
1810 #endif // SUBZERO_SRC_ICEINSTX8632_H | 1818 #endif // SUBZERO_SRC_ICEINSTX8632_H |
OLD | NEW |