Disambiguate lcall/ljmp to the 32-bit version. This happens

even in 64-bit mode apparently.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113945 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-09-15 05:14:54 +00:00
parent 6c1b3b1e32
commit 250b948f21
2 changed files with 16 additions and 0 deletions

View File

@ -979,6 +979,16 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
NameLoc, NameLoc));
}
// lcall *x and ljmp *x -> lcalll and ljmpl
if ((Name == "lcall" || Name == "ljmp") &&
Operands.size() == 3 &&
static_cast<X86Operand*>(Operands[1])->isToken() &&
static_cast<X86Operand*>(Operands[1])->getToken() == "*") {
delete Operands[0];
Operands[0] = X86Operand::CreateToken(Name == "lcall" ? "lcalll" : "ljmpl",
NameLoc);
}
return false;
}

View File

@ -288,3 +288,9 @@ shrd $1, %bx,%bx
sldt %ecx
sldt %cx
// CHECK: lcalll *3135175374
// CHECK: ljmpl *3135175374
lcall *0xbadeface
ljmp *0xbadeface