Fix encoding of CBZ/CBNZ Thumb2 instructions with immediate offsets rather than labels.
[oota-llvm.git] / test / MC / ARM / basic-thumb2-instructions.s
index 423e5bc316642873502e18e3b17103881004bdb1..61d651472ee48cf042f20ffe0ab6460b2ee05509 100644 (file)
@@ -37,6 +37,15 @@ _func:
 @ CHECK: adc   r4, r2, #2139095040     @ encoding: [0x42,0xf1,0xff,0x44]
 @ CHECK: adc   r4, r2, #1664           @ encoding: [0x42,0xf5,0xd0,0x64]
 
+@------------------------------------------------------------------------------
+@ CBZ/CBNZ
+@------------------------------------------------------------------------------
+        cbnz    r7, #6
+        cbnz    r7, #12
+
+@ CHECK: cbnz    r7, #6                  @ encoding: [0x1f,0xb9]
+@ CHECK: cbnz    r7, #12                 @ encoding: [0x37,0xb9]
+
 @------------------------------------------------------------------------------
 @ IT
 @------------------------------------------------------------------------------