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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 } else { | 263 } else { |
264 llvm_unreachable("Unexpected offset type"); | 264 llvm_unreachable("Unexpected offset type"); |
265 } | 265 } |
266 } | 266 } |
267 | 267 |
268 // Now convert to the various possible forms. | 268 // Now convert to the various possible forms. |
269 if (getBase() && getIndex()) { | 269 if (getBase() && getIndex()) { |
270 const bool NeedSandboxing = Target->needSandboxing(); | 270 const bool NeedSandboxing = Target->needSandboxing(); |
271 (void)NeedSandboxing; | 271 (void)NeedSandboxing; |
272 assert(!NeedSandboxing || IsLeaAddr || | 272 assert(!NeedSandboxing || IsLeaAddr || |
273 (getBase()->getRegNum() == Traits::RegisterSet::Reg_r15)); | 273 (getBase()->getRegNum() == Traits::RegisterSet::Reg_r15) || |
| 274 (getBase()->getRegNum() == Traits::RegisterSet::Reg_rsp) || |
| 275 (getBase()->getRegNum() == Traits::RegisterSet::Reg_rbp)); |
274 return X8664::Traits::Address(getEncodedGPR(getBase()->getRegNum()), | 276 return X8664::Traits::Address(getEncodedGPR(getBase()->getRegNum()), |
275 getEncodedGPR(getIndex()->getRegNum()), | 277 getEncodedGPR(getIndex()->getRegNum()), |
276 X8664::Traits::ScaleFactor(getShift()), Disp, | 278 X8664::Traits::ScaleFactor(getShift()), Disp, |
277 Fixup); | 279 Fixup); |
278 } | 280 } |
279 | 281 |
280 if (getBase()) { | 282 if (getBase()) { |
281 return X8664::Traits::Address(getEncodedGPR(getBase()->getRegNum()), Disp, | 283 return X8664::Traits::Address(getEncodedGPR(getBase()->getRegNum()), Disp, |
282 Fixup); | 284 Fixup); |
283 } | 285 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 Var->dump(Func); | 333 Var->dump(Func); |
332 else | 334 else |
333 Var->dump(Str); | 335 Var->dump(Str); |
334 Str << ")"; | 336 Str << ")"; |
335 } | 337 } |
336 | 338 |
337 } // namespace X8664 | 339 } // namespace X8664 |
338 } // end of namespace Ice | 340 } // end of namespace Ice |
339 | 341 |
340 X86INSTS_DEFINE_STATIC_DATA(X8664, X8664::Traits) | 342 X86INSTS_DEFINE_STATIC_DATA(X8664, X8664::Traits) |
OLD | NEW |