OLD | NEW |
---|---|
1 //===- subzero/src/IceInstX8664.cpp - X86-64 instruction implementation ---===// | 1 //===- subzero/src/IceInstX8664.cpp - X86-64 instruction implementation ---===// |
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 } | 163 } |
164 } else { | 164 } else { |
165 // There is only the offset. | 165 // There is only the offset. |
166 Offset->dump(Func, Str); | 166 Offset->dump(Func, Str); |
167 } | 167 } |
168 Str << "]"; | 168 Str << "]"; |
169 } | 169 } |
170 | 170 |
171 MachineTraits<TargetX8664>::Address | 171 MachineTraits<TargetX8664>::Address |
172 MachineTraits<TargetX8664>::X86OperandMem::toAsmAddress( | 172 MachineTraits<TargetX8664>::X86OperandMem::toAsmAddress( |
173 MachineTraits<TargetX8664>::Assembler *Asm) const { | 173 MachineTraits<TargetX8664>::Assembler *Asm, |
174 Ice::TargetLowering *Target) const { | |
175 // TODO(sehr): handle rematerializable base/index. | |
Jim Stichnoth
2015/11/11 17:39:44
Can you add asserts against rematerializable varia
sehr
2015/11/11 22:14:10
Done.
| |
176 (void)Target; | |
174 int32_t Disp = 0; | 177 int32_t Disp = 0; |
175 AssemblerFixup *Fixup = nullptr; | 178 AssemblerFixup *Fixup = nullptr; |
176 // Determine the offset (is it relocatable?) | 179 // Determine the offset (is it relocatable?) |
177 if (getOffset()) { | 180 if (getOffset()) { |
178 if (const auto *CI = llvm::dyn_cast<ConstantInteger32>(getOffset())) { | 181 if (const auto *CI = llvm::dyn_cast<ConstantInteger32>(getOffset())) { |
179 Disp = static_cast<int32_t>(CI->getValue()); | 182 Disp = static_cast<int32_t>(CI->getValue()); |
180 } else if (const auto CR = | 183 } else if (const auto CR = |
181 llvm::dyn_cast<ConstantRelocatable>(getOffset())) { | 184 llvm::dyn_cast<ConstantRelocatable>(getOffset())) { |
182 Disp = CR->getOffset() - 4; | 185 Disp = CR->getOffset() - 4; |
183 Fixup = Asm->createFixup(PcRelFixup, CR); | 186 Fixup = Asm->createFixup(PcRelFixup, CR); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
246 Var->dump(Func); | 249 Var->dump(Func); |
247 else | 250 else |
248 Var->dump(Str); | 251 Var->dump(Str); |
249 Str << ")"; | 252 Str << ")"; |
250 } | 253 } |
251 | 254 |
252 } // namespace X86Internal | 255 } // namespace X86Internal |
253 } // end of namespace Ice | 256 } // end of namespace Ice |
254 | 257 |
255 X86INSTS_DEFINE_STATIC_DATA(TargetX8664) | 258 X86INSTS_DEFINE_STATIC_DATA(TargetX8664) |
OLD | NEW |