53 lines · plain
1# RUN: llvm-mc %s -triple=riscv32 -mattr=+zihintntl,+c -show-encoding \2# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s3# RUN: llvm-mc %s -triple=riscv64 -mattr=+zihintntl,+c -show-encoding \4# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s5# 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 %s8# 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 %s11# RUN: not llvm-mc %s -triple=riscv32 -mattr=+zihintntl 2>&1 | FileCheck -check-prefix=CHECK-NO-C %s12# RUN: not llvm-mc %s -triple=riscv64 -mattr=+zihintntl 2>&1 | FileCheck -check-prefix=CHECK-NO-C %s13 14# CHECK-ASM-AND-OBJ: ntl.p115# CHECK-ASM: encoding: [0x33,0x00,0x20,0x00]16ntl.p117 18# CHECK-ASM-AND-OBJ: ntl.pall19# CHECK-ASM: encoding: [0x33,0x00,0x30,0x00]20ntl.pall21 22# CHECK-ASM-AND-OBJ: ntl.s123# CHECK-ASM: encoding: [0x33,0x00,0x40,0x00]24ntl.s125 26# CHECK-ASM-AND-OBJ: ntl.all27# CHECK-ASM: encoding: [0x33,0x00,0x50,0x00]28ntl.all29 30# CHECK-ASM-AND-OBJ: c.ntl.p131# CHECK-ASM: encoding: [0x0a,0x90]32# CHECK-NO-C: error: instruction requires the following: 'C' (Compressed Instructions)33# CHECK-NO-C-NEXT: c.ntl.p134c.ntl.p135 36# CHECK-ASM-AND-OBJ: c.ntl.pall37# CHECK-ASM: encoding: [0x0e,0x90]38# CHECK-NO-C: error: instruction requires the following: 'C' (Compressed Instructions)39# CHECK-NO-C-NEXT: c.ntl.pall40c.ntl.pall41 42# CHECK-ASM-AND-OBJ: c.ntl.s143# CHECK-ASM: encoding: [0x12,0x90]44# CHECK-NO-C: error: instruction requires the following: 'C' (Compressed Instructions)45# CHECK-NO-C-NEXT: c.ntl.s146c.ntl.s147 48# CHECK-ASM-AND-OBJ: c.ntl.all49# CHECK-ASM: encoding: [0x16,0x90]50# CHECK-NO-C: error: instruction requires the following: 'C' (Compressed Instructions)51# CHECK-NO-C-NEXT: c.ntl.all52c.ntl.all53