1# RUN: llvm-mc %s -triple=riscv64 -mattr=+a -riscv-no-aliases -show-encoding \ 2# RUN: | FileCheck -check-prefixes=CHECK,CHECK-INST %s 3# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+a < %s \ 4# RUN: | llvm-objdump -mattr=+a -riscv-no-aliases -d - \ 5# RUN: | FileCheck -check-prefix=CHECK-INST %s 6# RUN: not llvm-mc -triple riscv32 -mattr=+a < %s 2>&1 \ 7# RUN: | FileCheck -check-prefix=CHECK-RV32 %s 8 9# CHECK-INST: lr.d t0, (t1) 10# CHECK: encoding: [0xaf,0x32,0x03,0x10] 11# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 12lr.d t0, (t1) 13# CHECK-INST: lr.d.aq t1, (t2) 14# CHECK: encoding: [0x2f,0xb3,0x03,0x14] 15# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 16lr.d.aq t1, (t2) 17# CHECK-INST: lr.d.rl t2, (t3) 18# CHECK: encoding: [0xaf,0x33,0x0e,0x12] 19# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 20lr.d.rl t2, (t3) 21# CHECK-INST: lr.d.aqrl t3, (t4) 22# CHECK: encoding: [0x2f,0xbe,0x0e,0x16] 23# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 24lr.d.aqrl t3, (t4) 25 26# CHECK-INST: sc.d t6, t5, (t4) 27# CHECK: encoding: [0xaf,0xbf,0xee,0x19] 28# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 29sc.d t6, t5, (t4) 30# CHECK-INST: sc.d.aq t5, t4, (t3) 31# CHECK: encoding: [0x2f,0x3f,0xde,0x1d] 32# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 33sc.d.aq t5, t4, (t3) 34# CHECK-INST: sc.d.rl t4, t3, (t2) 35# CHECK: encoding: [0xaf,0xbe,0xc3,0x1b] 36# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 37sc.d.rl t4, t3, (t2) 38# CHECK-INST: sc.d.aqrl t3, t2, (t1) 39# CHECK: encoding: [0x2f,0x3e,0x73,0x1e] 40# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 41sc.d.aqrl t3, t2, (t1) 42 43# CHECK-INST: amoswap.d a4, ra, (s0) 44# CHECK: encoding: [0x2f,0x37,0x14,0x08] 45# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 46amoswap.d a4, ra, (s0) 47# CHECK-INST: amoadd.d a1, a2, (a3) 48# CHECK: encoding: [0xaf,0xb5,0xc6,0x00] 49# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 50amoadd.d a1, a2, (a3) 51# CHECK-INST: amoxor.d a2, a3, (a4) 52# CHECK: encoding: [0x2f,0x36,0xd7,0x20] 53# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 54amoxor.d a2, a3, (a4) 55# CHECK-INST: amoand.d a3, a4, (a5) 56# CHECK: encoding: [0xaf,0xb6,0xe7,0x60] 57# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 58amoand.d a3, a4, (a5) 59# CHECK-INST: amoor.d a4, a5, (a6) 60# CHECK: encoding: [0x2f,0x37,0xf8,0x40] 61# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 62amoor.d a4, a5, (a6) 63# CHECK-INST: amomin.d a5, a6, (a7) 64# CHECK: encoding: [0xaf,0xb7,0x08,0x81] 65# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 66amomin.d a5, a6, (a7) 67# CHECK-INST: amomax.d s7, s6, (s5) 68# CHECK: encoding: [0xaf,0xbb,0x6a,0xa1] 69# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 70amomax.d s7, s6, (s5) 71# CHECK-INST: amominu.d s6, s5, (s4) 72# CHECK: encoding: [0x2f,0x3b,0x5a,0xc1] 73# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 74amominu.d s6, s5, (s4) 75# CHECK-INST: amomaxu.d s5, s4, (s3) 76# CHECK: encoding: [0xaf,0xba,0x49,0xe1] 77# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 78amomaxu.d s5, s4, (s3) 79 80 81# CHECK-INST: amoswap.d.aq a4, ra, (s0) 82# CHECK: encoding: [0x2f,0x37,0x14,0x0c] 83# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 84amoswap.d.aq a4, ra, (s0) 85# CHECK-INST: amoadd.d.aq a1, a2, (a3) 86# CHECK: encoding: [0xaf,0xb5,0xc6,0x04] 87# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 88amoadd.d.aq a1, a2, (a3) 89# CHECK-INST: amoxor.d.aq a2, a3, (a4) 90# CHECK: encoding: [0x2f,0x36,0xd7,0x24] 91# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 92amoxor.d.aq a2, a3, (a4) 93# CHECK-INST: amoand.d.aq a3, a4, (a5) 94# CHECK: encoding: [0xaf,0xb6,0xe7,0x64] 95# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 96amoand.d.aq a3, a4, (a5) 97# CHECK-INST: amoor.d.aq a4, a5, (a6) 98# CHECK: encoding: [0x2f,0x37,0xf8,0x44] 99# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 100amoor.d.aq a4, a5, (a6) 101# CHECK-INST: amomin.d.aq a5, a6, (a7) 102# CHECK: encoding: [0xaf,0xb7,0x08,0x85] 103# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 104amomin.d.aq a5, a6, (a7) 105# CHECK-INST: amomax.d.aq s7, s6, (s5) 106# CHECK: encoding: [0xaf,0xbb,0x6a,0xa5] 107# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 108amomax.d.aq s7, s6, (s5) 109# CHECK-INST: amominu.d.aq s6, s5, (s4) 110# CHECK: encoding: [0x2f,0x3b,0x5a,0xc5] 111# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 112amominu.d.aq s6, s5, (s4) 113# CHECK-INST: amomaxu.d.aq s5, s4, (s3) 114# CHECK: encoding: [0xaf,0xba,0x49,0xe5] 115# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 116amomaxu.d.aq s5, s4, (s3) 117 118# CHECK-INST: amoswap.d.rl a4, ra, (s0) 119# CHECK: encoding: [0x2f,0x37,0x14,0x0a] 120# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 121amoswap.d.rl a4, ra, (s0) 122# CHECK-INST: amoadd.d.rl a1, a2, (a3) 123# CHECK: encoding: [0xaf,0xb5,0xc6,0x02] 124# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 125amoadd.d.rl a1, a2, (a3) 126# CHECK-INST: amoxor.d.rl a2, a3, (a4) 127# CHECK: encoding: [0x2f,0x36,0xd7,0x22] 128# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 129amoxor.d.rl a2, a3, (a4) 130# CHECK-INST: amoand.d.rl a3, a4, (a5) 131# CHECK: encoding: [0xaf,0xb6,0xe7,0x62] 132# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 133amoand.d.rl a3, a4, (a5) 134# CHECK-INST: amoor.d.rl a4, a5, (a6) 135# CHECK: encoding: [0x2f,0x37,0xf8,0x42] 136# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 137amoor.d.rl a4, a5, (a6) 138# CHECK-INST: amomin.d.rl a5, a6, (a7) 139# CHECK: encoding: [0xaf,0xb7,0x08,0x83] 140# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 141amomin.d.rl a5, a6, (a7) 142# CHECK-INST: amomax.d.rl s7, s6, (s5) 143# CHECK: encoding: [0xaf,0xbb,0x6a,0xa3] 144# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 145amomax.d.rl s7, s6, (s5) 146# CHECK-INST: amominu.d.rl s6, s5, (s4) 147# CHECK: encoding: [0x2f,0x3b,0x5a,0xc3] 148# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 149amominu.d.rl s6, s5, (s4) 150# CHECK-INST: amomaxu.d.rl s5, s4, (s3) 151# CHECK: encoding: [0xaf,0xba,0x49,0xe3] 152# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 153amomaxu.d.rl s5, s4, (s3) 154 155# CHECK-INST: amoswap.d.aqrl a4, ra, (s0) 156# CHECK: encoding: [0x2f,0x37,0x14,0x0e] 157# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 158amoswap.d.aqrl a4, ra, (s0) 159# CHECK-INST: amoadd.d.aqrl a1, a2, (a3) 160# CHECK: encoding: [0xaf,0xb5,0xc6,0x06] 161# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 162amoadd.d.aqrl a1, a2, (a3) 163# CHECK-INST: amoxor.d.aqrl a2, a3, (a4) 164# CHECK: encoding: [0x2f,0x36,0xd7,0x26] 165# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 166amoxor.d.aqrl a2, a3, (a4) 167# CHECK-INST: amoand.d.aqrl a3, a4, (a5) 168# CHECK: encoding: [0xaf,0xb6,0xe7,0x66] 169# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 170amoand.d.aqrl a3, a4, (a5) 171# CHECK-INST: amoor.d.aqrl a4, a5, (a6) 172# CHECK: encoding: [0x2f,0x37,0xf8,0x46] 173# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 174amoor.d.aqrl a4, a5, (a6) 175# CHECK-INST: amomin.d.aqrl a5, a6, (a7) 176# CHECK: encoding: [0xaf,0xb7,0x08,0x87] 177# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 178amomin.d.aqrl a5, a6, (a7) 179# CHECK-INST: amomax.d.aqrl s7, s6, (s5) 180# CHECK: encoding: [0xaf,0xbb,0x6a,0xa7] 181# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 182amomax.d.aqrl s7, s6, (s5) 183# CHECK-INST: amominu.d.aqrl s6, s5, (s4) 184# CHECK: encoding: [0x2f,0x3b,0x5a,0xc7] 185# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 186amominu.d.aqrl s6, s5, (s4) 187# CHECK-INST: amomaxu.d.aqrl s5, s4, (s3) 188# CHECK: encoding: [0xaf,0xba,0x49,0xe7] 189# CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled 190amomaxu.d.aqrl s5, s4, (s3) 191