79 lines · plain
1# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zalasr -M no-aliases -show-encoding \2# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s3# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zalasr < %s \4# RUN: | llvm-objdump --mattr=+experimental-zalasr -M no-aliases -d -r - \5# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s6# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zalasr -M no-aliases -show-encoding \7# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s8# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zalasr < %s \9# RUN: | llvm-objdump --mattr=+experimental-zalasr -M no-aliases -d -r - \10# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s11#12# RUN: not llvm-mc -triple riscv32 \13# RUN: -M no-aliases -show-encoding < %s 2>&1 \14# RUN: | FileCheck --check-prefixes=CHECK-NO-EXT %s15# RUN: not llvm-mc -triple riscv64 \16# RUN: -M no-aliases -show-encoding < %s 2>&1 \17# RUN: | FileCheck --check-prefixes=CHECK-NO-EXT %s18 19# CHECK-ASM-AND-OBJ: lb.aq t1, (a0)20# CHECK-ASM: encoding: [0x2f,0x03,0x05,0x34]21# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}22lb.aq t1, 0(a0)23 24# CHECK-ASM-AND-OBJ: lh.aq t1, (a0)25# CHECK-ASM: encoding: [0x2f,0x13,0x05,0x34]26# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}27lh.aq t1, 0(a0)28 29# CHECK-ASM-AND-OBJ: lw.aq t1, (a0)30# CHECK-ASM: encoding: [0x2f,0x23,0x05,0x34]31# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}32lw.aq t1, (a0)33 34# CHECK-ASM-AND-OBJ: lb.aqrl t1, (a0)35# CHECK-ASM: encoding: [0x2f,0x03,0x05,0x36]36# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}37lb.aqrl t1, 0(a0)38 39# CHECK-ASM-AND-OBJ: lh.aqrl t1, (a0)40# CHECK-ASM: encoding: [0x2f,0x13,0x05,0x36]41# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}42lh.aqrl t1, (a0)43 44# CHECK-ASM-AND-OBJ: lw.aqrl t1, (a0)45# CHECK-ASM: encoding: [0x2f,0x23,0x05,0x36]46# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}47lw.aqrl t1, (a0)48 49 50# CHECK-ASM-AND-OBJ: sb.rl t1, (a0)51# CHECK-ASM: encoding: [0x2f,0x00,0x65,0x3a]52# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}53sb.rl t1, (a0)54 55# CHECK-ASM-AND-OBJ: sh.rl t1, (a0)56# CHECK-ASM: encoding: [0x2f,0x10,0x65,0x3a]57# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}58sh.rl t1, 0(a0)59 60# CHECK-ASM-AND-OBJ: sw.rl t1, (a0)61# CHECK-ASM: encoding: [0x2f,0x20,0x65,0x3a]62# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}63sw.rl t1, (a0)64 65# CHECK-ASM-AND-OBJ: sb.aqrl t1, (a0)66# CHECK-ASM: encoding: [0x2f,0x00,0x65,0x3e]67# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}68sb.aqrl t1, (a0)69 70# CHECK-ASM-AND-OBJ: sh.aqrl t1, (a0)71# CHECK-ASM: encoding: [0x2f,0x10,0x65,0x3e]72# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}73sh.aqrl t1, 0(a0)74 75# CHECK-ASM-AND-OBJ: sw.aqrl t1, (a0)76# CHECK-ASM: encoding: [0x2f,0x20,0x65,0x3e]77# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}78sw.aqrl t1, 0(a0)79