Prior to this patch, we would wrongly stick to the variant with imm8 encoding
even when the relocation could not fit that size.
rdar://problem/
23785506
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255583
91177308-0d34-0410-b5e6-
96231b3b80d8
case X86::SUB64ri8: return X86::SUB64ri32;
case X86::SUB64mi8: return X86::SUB64mi32;
+ // SBB
+ case X86::SBB16ri8: return X86::SBB16ri;
+ case X86::SBB16mi8: return X86::SBB16mi;
+ case X86::SBB32ri8: return X86::SBB32ri;
+ case X86::SBB32mi8: return X86::SBB32mi;
+ case X86::SBB64ri8: return X86::SBB64ri32;
+ case X86::SBB64mi8: return X86::SBB64mi32;
+
// CMP
case X86::CMP16ri8: return X86::CMP16ri;
case X86::CMP16mi8: return X86::CMP16mi;
adcl $foo, bar
adc $foo, %rbx
adcq $foo, bar
+
+// CHECK: Disassembly of section sbb:
+// CHECK-NEXT: sbb:
+// CHECK-NEXT: 0: 66 81 db 00 00 sbbw $0, %bx
+// CHECK-NEXT: 5: 66 81 1c 25 00 00 00 00 00 00 sbbw $0, 0
+// CHECK-NEXT: f: 81 db 00 00 00 00 sbbl $0, %ebx
+// CHECK-NEXT: 15: 81 1c 25 00 00 00 00 00 00 00 00 sbbl $0, 0
+// CHECK-NEXT: 20: 48 81 db 00 00 00 00 sbbq $0, %rbx
+// CHECK-NEXT: 27: 48 81 1c 25 00 00 00 00 00 00 00 00 sbbq $0, 0
+ .section sbb,"x"
+ sbb $foo, %bx
+ sbbw $foo, bar
+ sbb $foo, %ebx
+ sbbl $foo, bar
+ sbb $foo, %rbx
+ sbbq $foo, bar