1 # RUN: llvm-mc %s -triple=riscv32 -mattr=+zihintntl,+c -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3 # RUN: llvm-mc %s -triple=riscv64 -mattr=+zihintntl,+c -show-encoding \
4 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
5 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+zihintntl,+c < %s \
6 # RUN: | llvm-objdump --mattr=+zihintntl,+c -d -r - \
7 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
8 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zihintntl,+c < %s \
9 # RUN: | llvm-objdump --mattr=+zihintntl,+c -d -r - \
10 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
11 # RUN: not llvm-mc %s -triple=riscv32 -mattr=+zihintntl 2>&1 | FileCheck -check-prefix=CHECK-NO-C %s
12 # RUN: not llvm-mc %s -triple=riscv64 -mattr=+zihintntl 2>&1 | FileCheck -check-prefix=CHECK-NO-C %s
14 # CHECK-ASM-AND-OBJ: ntl.p1
15 # CHECK-ASM: encoding: [0x33,0x00,0x20,0x00]
18 # CHECK-ASM-AND-OBJ: ntl.pall
19 # CHECK-ASM: encoding: [0x33,0x00,0x30,0x00]
22 # CHECK-ASM-AND-OBJ: ntl.s1
23 # CHECK-ASM: encoding: [0x33,0x00,0x40,0x00]
26 # CHECK-ASM-AND-OBJ: ntl.all
27 # CHECK-ASM: encoding: [0x33,0x00,0x50,0x00]
30 # CHECK-ASM-AND-OBJ: c.ntl.p1
31 # CHECK-ASM: encoding: [0x0a,0x90]
32 # CHECK-NO-C: error: instruction requires the following: 'C' (Compressed Instructions)
33 # CHECK-NO-C-NEXT: c.ntl.p1
36 # CHECK-ASM-AND-OBJ: c.ntl.pall
37 # CHECK-ASM: encoding: [0x0e,0x90]
38 # CHECK-NO-C: error: instruction requires the following: 'C' (Compressed Instructions)
39 # CHECK-NO-C-NEXT: c.ntl.pall
42 # CHECK-ASM-AND-OBJ: c.ntl.s1
43 # CHECK-ASM: encoding: [0x12,0x90]
44 # CHECK-NO-C: error: instruction requires the following: 'C' (Compressed Instructions)
45 # CHECK-NO-C-NEXT: c.ntl.s1
48 # CHECK-ASM-AND-OBJ: c.ntl.all
49 # CHECK-ASM: encoding: [0x16,0x90]
50 # CHECK-NO-C: error: instruction requires the following: 'C' (Compressed Instructions)
51 # CHECK-NO-C-NEXT: c.ntl.all