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:
parent
9dc2822253
commit
91e636b4ee
@ -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.
|
||||
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user