mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[X86] Add proper 64-bit mode checks to jrcxz and jcxz.
llvm-svn: 241381
This commit is contained in:
parent
30008082bc
commit
3faa86f8f9
@ -105,14 +105,16 @@ let isBranch = 1, isTerminator = 1, hasSideEffects = 0, SchedRW = [WriteJump] in
|
||||
// jecxz.
|
||||
let Uses = [CX] in
|
||||
def JCXZ : Ii8PCRel<0xE3, RawFrm, (outs), (ins brtarget8:$dst),
|
||||
"jcxz\t$dst", [], IIC_JCXZ>, AdSize16;
|
||||
"jcxz\t$dst", [], IIC_JCXZ>, AdSize16,
|
||||
Requires<[Not64BitMode]>;
|
||||
let Uses = [ECX] in
|
||||
def JECXZ : Ii8PCRel<0xE3, RawFrm, (outs), (ins brtarget8:$dst),
|
||||
"jecxz\t$dst", [], IIC_JCXZ>, AdSize32;
|
||||
|
||||
let Uses = [RCX] in
|
||||
def JRCXZ : Ii8PCRel<0xE3, RawFrm, (outs), (ins brtarget8:$dst),
|
||||
"jrcxz\t$dst", [], IIC_JCXZ>, AdSize64;
|
||||
"jrcxz\t$dst", [], IIC_JCXZ>, AdSize64,
|
||||
Requires<[In64BitMode]>;
|
||||
}
|
||||
|
||||
// Indirect branches
|
||||
|
@ -58,3 +58,9 @@ cmpps $-129, %xmm0, %xmm0
|
||||
// 32: error: invalid operand for instruction
|
||||
// 64: error: invalid operand for instruction
|
||||
cmppd $256, %xmm0, %xmm0
|
||||
|
||||
// 32: error: instruction requires: 64-bit mode
|
||||
jrcxz 1
|
||||
|
||||
// 64: error: instruction requires: Not 64-bit mode
|
||||
jcxz 1
|
||||
|
Loading…
Reference in New Issue
Block a user