1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Revert "[X86][AsmParser] Emit an error when RIP-relative instructions are used in 32-bit mode"

This reverts commit 4850a9aae8b38c7deadc103d634ec7397e6c323b.

It caused MC/X86/x86_errors.s to fail. Will fix and recommit shortly.

llvm-svn: 335660
This commit is contained in:
Jessica Paquette 2018-06-26 20:57:19 +00:00
parent 9dc2822253
commit 91e636b4ee
2 changed files with 0 additions and 20 deletions

View File

@ -974,13 +974,6 @@ static unsigned MatchRegisterName(StringRef Name);
static bool CheckBaseRegAndIndexRegAndScale(unsigned BaseReg, unsigned IndexReg,
unsigned Scale, bool Is64BitMode,
StringRef &ErrMsg) {
// RIP/EIP-relative addressing is only supported in 64-bit mode.
if (!Is64BitMode && BaseReg != 0 &&
(BaseReg == X86::RIP || BaseReg == X86::EIP)) {
ErrMsg = "RIP-relative addressing requires 64-bit mode";
return true;
}
// If we have both a base register and an index register make sure they are
// both 64-bit or 32-bit registers.
// To support VSIB, IndexReg can be 128-bit or 256-bit registers.

View File

@ -1,13 +0,0 @@
; RUN: not llc -mtriple i386-apple-- -o /dev/null < %s 2>&1| FileCheck %s
; CHECK: <inline asm>:1:13: error: RIP-relative addressing requires 64-bit mode
; CHECK-NEXT: jmpl *_foo(%eip)
; Make sure that we emit an error if we encounter RIP-relative instructions in
; 32-bit mode.
define i32 @foo() { ret i32 0 }
define i32 @bar() {
call void asm sideeffect "jmpl *_foo(%eip)\0A", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}