mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
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:
parent
6c1b3b1e32
commit
250b948f21
@ -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;
|
||||
}
|
||||
|
||||
|
@ -288,3 +288,9 @@ shrd $1, %bx,%bx
|
||||
sldt %ecx
|
||||
sldt %cx
|
||||
|
||||
// CHECK: lcalll *3135175374
|
||||
// CHECK: ljmpl *3135175374
|
||||
lcall *0xbadeface
|
||||
ljmp *0xbadeface
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user