mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 21:35:07 +00:00
x86: add implicit defs for cpuid
This avoids miscompiling MS inline asm in LLVM where we have to infer clobbers. Test case forthcoming in Clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5ea4a54551
commit
1386d3f885
@ -455,8 +455,13 @@ def LMSW16r : I<0x01, MRM6r, (outs), (ins GR16:$src),
|
||||
"lmsw{w}\t$src", [], IIC_LMSW_MEM>, TB;
|
||||
def LMSW16m : I<0x01, MRM6m, (outs), (ins i16mem:$src),
|
||||
"lmsw{w}\t$src", [], IIC_LMSW_REG>, TB;
|
||||
|
||||
def CPUID : I<0xA2, RawFrm, (outs), (ins), "cpuid", [], IIC_CPUID>, TB;
|
||||
|
||||
let Defs = [EAX, EBX, ECX, EDX], Uses = [EAX, ECX] in
|
||||
def CPUID32 : I<0xA2, RawFrm, (outs), (ins), "cpuid", [], IIC_CPUID>, TB,
|
||||
Requires<[Not64BitMode]>;
|
||||
let Defs = [RAX, RBX, RCX, RDX], Uses = [RAX, RCX] in
|
||||
def CPUID64 : I<0xA2, RawFrm, (outs), (ins), "cpuid", [], IIC_CPUID>, TB,
|
||||
Requires<[In64BitMode]>;
|
||||
} // SchedRW
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Loading…
x
Reference in New Issue
Block a user