mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
[X86] Add RAX/EAX/AX Uses/Defs to XCHG RAX/EAX/AX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202347 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
956ef7f165
commit
7e992687ad
@ -1684,16 +1684,20 @@ def XCHG64rr : RI<0x87, MRMSrcReg, (outs GR64:$dst), (ins GR64:$val,GR64:$src),
|
||||
}
|
||||
|
||||
// Swap between EAX and other registers.
|
||||
let Uses = [AX], Defs = [AX] in
|
||||
def XCHG16ar : I<0x90, AddRegFrm, (outs), (ins GR16:$src),
|
||||
"xchg{w}\t{$src, %ax|ax, $src}", [], IIC_XCHG_REG>, OpSize16;
|
||||
let Uses = [EAX], Defs = [EAX] in
|
||||
def XCHG32ar : I<0x90, AddRegFrm, (outs), (ins GR32:$src),
|
||||
"xchg{l}\t{$src, %eax|eax, $src}", [], IIC_XCHG_REG>,
|
||||
OpSize32, Requires<[Not64BitMode]>;
|
||||
let Uses = [EAX], Defs = [EAX] in
|
||||
// Uses GR32_NOAX in 64-bit mode to prevent encoding using the 0x90 NOP encoding.
|
||||
// xchg %eax, %eax needs to clear upper 32-bits of RAX so is not a NOP.
|
||||
def XCHG32ar64 : I<0x90, AddRegFrm, (outs), (ins GR32_NOAX:$src),
|
||||
"xchg{l}\t{$src, %eax|eax, $src}", [], IIC_XCHG_REG>,
|
||||
OpSize32, Requires<[In64BitMode]>;
|
||||
let Uses = [RAX], Defs = [RAX] in
|
||||
def XCHG64ar : RI<0x90, AddRegFrm, (outs), (ins GR64:$src),
|
||||
"xchg{q}\t{$src, %rax|rax, $src}", [], IIC_XCHG_REG>;
|
||||
} // SchedRW
|
||||
|
Loading…
x
Reference in New Issue
Block a user