11# Xqcibm - Qualcomm uC Bit Manipulation Extension
2- # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-xqcibm -M no-aliases -show-encoding \
2+ # Zbs is needed for checking compress instructions patterns for bexti/bseti
3+ # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-xqcibm,+zbs -M no-aliases -show-encoding \
34# RUN: | FileCheck -check-prefixes=CHECK-ENC,CHECK-INST,CHECK-NOALIAS %s
4- # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcibm < %s \
5- # RUN: | llvm-objdump --mattr=+experimental-xqcibm -M no-aliases --no-print-imm-hex -d - \
5+ # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcibm,+zbs < %s \
6+ # RUN: | llvm-objdump --mattr=+experimental-xqcibm,+zbs -M no-aliases --no-print-imm-hex -d - \
67# RUN: | FileCheck -check-prefix=CHECK-INST %s
7- # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-xqcibm -show-encoding \
8+ # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-xqcibm,+zbs -show-encoding \
89# RUN: | FileCheck -check-prefixes=CHECK-ENC,CHECK-INST,CHECK-ALIAS %s
9- # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcibm < %s \
10- # RUN: | llvm-objdump --mattr=+experimental-xqcibm --no-print-imm-hex -d - \
10+ # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcibm,+zbs < %s \
11+ # RUN: | llvm-objdump --mattr=+experimental-xqcibm,+zbs --no-print-imm-hex -d - \
1112# RUN: | FileCheck -check-prefix=CHECK-INST %s
1213
1314# CHECK-INST: qc.compress2 t2, t0
@@ -110,11 +111,13 @@ qc.extdpr x1, x4, x15
110111# CHECK-ENC: encoding: [0x0b,0x33,0x9c,0x13]
111112qc.extdprh x6, x24, x25
112113
113- # CHECK-INST: qc.c.bexti s1, 8
114+ # CHECK-NOALIAS: qc.c.bexti s1, 8
115+ # CHECK-ALIAS: bexti s1, s1, 8
114116# CHECK-ENC: encoding: [0xa1,0x90]
115117qc.c.bexti x9, 8
116118
117- # CHECK-INST: qc.c.bseti a2, 16
119+ # CHECK-NOALIAS: qc.c.bseti a2, 16
120+ # CHECK-ALIAS: bseti a2, a2, 16
118121# CHECK-ENC: encoding: [0x41,0x96]
119122qc.c.bseti x12, 16
120123
@@ -123,9 +126,19 @@ qc.c.bseti x12, 16
123126# CHECK-ENC: encoding: [0xfe,0x17]
124127qc.c.extu x15, 32
125128
126- # Check that compress pattern for qc.extu works
129+ # Check that compress patterns work as expected
127130
128131# CHECK-NOALIAS: qc.c.extu a1, 11
129132# CHECK-ALIAS: qc.extu a1, a1, 11, 0
130133# CHECK-ENC: encoding: [0xaa,0x15]
131- qc.extu x11, x11, 11 , 0
134+ qc.extu x11, x11, 11 , 0
135+
136+ # CHECK-NOALIAS: qc.c.bexti s1, 8
137+ # CHECK-ALIAS: bexti s1, s1, 8
138+ # CHECK-ENC-ZBS: encoding: [0xa1,0x90]
139+ bexti x9, x9, 8
140+
141+ # CHECK-NOALIAS: qc.c.bseti a2, 16
142+ # CHECK-ALIAS: bseti a2, a2, 16
143+ # CHECK-ENC: encoding: [0x41,0x96]
144+ bseti x12, x12, 16
0 commit comments