mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-30 07:14:53 +00:00
Fixed the word sized Bit Scan Forward/Reverse instructions, they needed the
Operand size override prefix to be part of their records. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102556 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2ad0fcf794
commit
9ac7282117
@ -781,10 +781,11 @@ let isTwoAddress = 1 in // GR32 = bswap GR32
|
||||
let Defs = [EFLAGS] in {
|
||||
def BSF16rr : I<0xBC, MRMSrcReg, (outs GR16:$dst), (ins GR16:$src),
|
||||
"bsf{w}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR16:$dst, EFLAGS, (X86bsf GR16:$src))]>, TB;
|
||||
[(set GR16:$dst, EFLAGS, (X86bsf GR16:$src))]>, TB, OpSize;
|
||||
def BSF16rm : I<0xBC, MRMSrcMem, (outs GR16:$dst), (ins i16mem:$src),
|
||||
"bsf{w}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR16:$dst, EFLAGS, (X86bsf (loadi16 addr:$src)))]>, TB;
|
||||
[(set GR16:$dst, EFLAGS, (X86bsf (loadi16 addr:$src)))]>, TB,
|
||||
OpSize;
|
||||
def BSF32rr : I<0xBC, MRMSrcReg, (outs GR32:$dst), (ins GR32:$src),
|
||||
"bsf{l}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, EFLAGS, (X86bsf GR32:$src))]>, TB;
|
||||
@ -794,10 +795,11 @@ def BSF32rm : I<0xBC, MRMSrcMem, (outs GR32:$dst), (ins i32mem:$src),
|
||||
|
||||
def BSR16rr : I<0xBD, MRMSrcReg, (outs GR16:$dst), (ins GR16:$src),
|
||||
"bsr{w}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR16:$dst, EFLAGS, (X86bsr GR16:$src))]>, TB;
|
||||
[(set GR16:$dst, EFLAGS, (X86bsr GR16:$src))]>, TB, OpSize;
|
||||
def BSR16rm : I<0xBD, MRMSrcMem, (outs GR16:$dst), (ins i16mem:$src),
|
||||
"bsr{w}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR16:$dst, EFLAGS, (X86bsr (loadi16 addr:$src)))]>, TB;
|
||||
[(set GR16:$dst, EFLAGS, (X86bsr (loadi16 addr:$src)))]>, TB,
|
||||
OpSize;
|
||||
def BSR32rr : I<0xBD, MRMSrcReg, (outs GR32:$dst), (ins GR32:$src),
|
||||
"bsr{l}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, EFLAGS, (X86bsr GR32:$src))]>, TB;
|
||||
|
@ -9968,3 +9968,19 @@
|
||||
// CHECK: fixup A - offset: 5, value: CPI1_0-4
|
||||
pshufb CPI1_0(%rip), %xmm1
|
||||
|
||||
// rdar://7910087
|
||||
// CHECK: bsfw %bx, %bx
|
||||
// CHECK: encoding: [0x66,0x0f,0xbc,0xdb]
|
||||
bsfw %bx, %bx
|
||||
|
||||
// CHECK: bsfw 3735928559(%ebx,%ecx,8), %bx
|
||||
// CHECK: encoding: [0x66,0x0f,0xbc,0x9c,0xcb,0xef,0xbe,0xad,0xde]
|
||||
bsfw 3735928559(%ebx,%ecx,8), %bx
|
||||
|
||||
// CHECK: bsrw %bx, %bx
|
||||
// CHECK: encoding: [0x66,0x0f,0xbd,0xdb]
|
||||
bsrw %bx, %bx
|
||||
|
||||
// CHECK: bsrw 305419896, %bx
|
||||
// CHECK: encoding: [0x66,0x0f,0xbd,0x1d,0x78,0x56,0x34,0x12]
|
||||
bsrw 305419896, %bx
|
||||
|
Loading…
x
Reference in New Issue
Block a user