Skip to content

Commit e296ced

Browse files
mehnadnerdbrspreames
authored
[RISCV][MC] MC layer support for the experimental zalasr extension (#79911)
This PR implements experimental support for the RISC-V Atomic Load-Acquire and Store-Release Extension (Zalasr). It has been approved to be pursued as a fast track extension (https://lists.riscv.org/g/tech-unprivileged/topic/arc_architecture_review/101951698), but has not yet been approved by ARC or ratified. See https://github.com/mehnadnerd/riscv-zalasr for draft spec. --------- Co-authored-by: brs <[email protected]> Co-authored-by: Philip Reames <[email protected]>
1 parent ef7f6ac commit e296ced

13 files changed

+265
-0
lines changed

clang/test/Preprocessor/riscv-target-features.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144

145145
// CHECK-NOT: __riscv_zaamo {{.*$}}
146146
// CHECK-NOT: __riscv_zacas {{.*$}}
147+
// CHECK-NOT: __riscv_zalasr {{.*$}}
147148
// CHECK-NOT: __riscv_zalrsc {{.*$}}
148149
// CHECK-NOT: __riscv_zcmop {{.*$}}
149150
// CHECK-NOT: __riscv_zfbfmin {{.*$}}
@@ -1333,6 +1334,14 @@
13331334
// RUN: -o - | FileCheck --check-prefix=CHECK-ZACAS-EXT %s
13341335
// CHECK-ZACAS-EXT: __riscv_zacas 1000000{{$}}
13351336

1337+
// RUN: %clang --target=riscv32 -menable-experimental-extensions \
1338+
// RUN: -march=rv32i_zalasr0p1 -E -dM %s \
1339+
// RUN: -o - | FileCheck --check-prefix=CHECK-ZALASR-EXT %s
1340+
// RUN: %clang --target=riscv64 -menable-experimental-extensions \
1341+
// RUN: -march=rv64i_zalasr0p1 -E -dM %s \
1342+
// RUN: -o - | FileCheck --check-prefix=CHECK-ZALASR-EXT %s
1343+
// CHECK-ZALASR-EXT: __riscv_zalasr 1000{{$}}
1344+
13361345
// RUN: %clang --target=riscv32 -menable-experimental-extensions \
13371346
// RUN: -march=rv32i_zalrsc0p2 -E -dM %s \
13381347
// RUN: -o - | FileCheck --check-prefix=CHECK-ZALRSC-EXT %s

llvm/docs/RISCVUsage.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ The primary goal of experimental support is to assist in the process of ratifica
232232
``experimental-zacas``
233233
LLVM implements the `1.0-rc1 draft specification <https://github.com/riscv/riscv-zacas/releases/tag/v1.0-rc1>`_.
234234

235+
``experimental-zalasr``
236+
LLVM implements the `0.0.5 draft specification <https://github.com/mehnadnerd/riscv-zalasr>`_.
237+
235238
``experimental-zfbfmin``, ``experimental-zvfbfmin``, ``experimental-zvfbfwma``
236239
LLVM implements assembler support for the `1.0.0-rc2 specification <https://github.com/riscv/riscv-bfloat16/releases/tag/v59042fc71c31a9bcb2f1957621c960ed36fac401>`_.
237240

llvm/lib/Support/RISCVISAInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ static const RISCVSupportedExtension SupportedExperimentalExtensions[] = {
197197
{"zaamo", {0, 2}},
198198
{"zabha", {1, 0}},
199199
{"zacas", {1, 0}},
200+
{"zalasr", {0, 1}},
200201
{"zalrsc", {0, 2}},
201202

202203
{"zcmop", {0, 2}},

llvm/lib/Target/RISCV/RISCVFeatures.td

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ def HasStdExtZacas : Predicate<"Subtarget->hasStdExtZacas()">,
192192
"'Zacas' (Atomic Compare-And-Swap Instructions)">;
193193
def NoStdExtZacas : Predicate<"!Subtarget->hasStdExtZacas()">;
194194

195+
def FeatureStdExtZalasr
196+
: SubtargetFeature<"experimental-zalasr", "HasStdExtZalasr", "true",
197+
"'Zalasr' (Load-Acquire and Store-Release Instructions)">;
198+
def HasStdExtZalasr : Predicate<"Subtarget->hasStdExtZalasr()">,
199+
AssemblerPredicate<(all_of FeatureStdExtZalasr),
200+
"'Zalasr' (Load-Acquire and Store-Release Instructions)">;
201+
195202
def FeatureStdExtZalrsc
196203
: SubtargetFeature<"experimental-zalrsc", "HasStdExtZalrsc", "true",
197204
"'Zalrsc' (Load-Reserved/Store-Conditional)">;

llvm/lib/Target/RISCV/RISCVInstrInfo.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,6 +2146,7 @@ include "RISCVInstrInfoM.td"
21462146
// Atomic
21472147
include "RISCVInstrInfoA.td"
21482148
include "RISCVInstrInfoZa.td"
2149+
include "RISCVInstrInfoZalasr.td"
21492150

21502151
// Scalar FP
21512152
include "RISCVInstrInfoF.td"
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
//===-- RISCVInstrInfoZalasr.td ---------------------------*- tablegen -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file describes the RISC-V instructions from the Zalasr (Load-Acquire
10+
// and Store-Release) extension
11+
//
12+
//===----------------------------------------------------------------------===//
13+
14+
//===----------------------------------------------------------------------===//
15+
// Instruction class templates
16+
//===----------------------------------------------------------------------===//
17+
18+
let hasSideEffects = 0, mayLoad = 1, mayStore = 0 in
19+
class LAQ_r<bit aq, bit rl, bits<3> funct3, string opcodestr>
20+
: RVInstRAtomic<0b00110, aq, rl, funct3, OPC_AMO,
21+
(outs GPR:$rd), (ins GPRMemZeroOffset:$rs1),
22+
opcodestr, "$rd, $rs1"> {
23+
let rs2 = 0;
24+
}
25+
26+
let hasSideEffects = 0, mayLoad = 0, mayStore = 1 in
27+
class SRL_r<bit aq, bit rl, bits<3> funct3, string opcodestr>
28+
: RVInstRAtomic<0b00111, aq, rl, funct3, OPC_AMO,
29+
(outs ), (ins GPRMemZeroOffset:$rs1, GPR:$rs2),
30+
opcodestr, "$rs2, $rs1"> {
31+
let rd = 0;
32+
}
33+
multiclass LAQ_r_aq_rl<bits<3> funct3, string opcodestr> {
34+
def _AQ : LAQ_r<1, 0, funct3, opcodestr # ".aq">;
35+
def _AQ_RL : LAQ_r<1, 1, funct3, opcodestr # ".aqrl">;
36+
}
37+
38+
multiclass SRL_r_aq_rl<bits<3> funct3, string opcodestr> {
39+
def _RL : SRL_r<0, 1, funct3, opcodestr # ".rl">;
40+
def _AQ_RL : SRL_r<1, 1, funct3, opcodestr # ".aqrl">;
41+
}
42+
43+
//===----------------------------------------------------------------------===//
44+
// Instructions
45+
//===----------------------------------------------------------------------===//
46+
47+
let Predicates = [HasStdExtZalasr] in {
48+
defm LB : LAQ_r_aq_rl<0b000, "lb">;
49+
defm LH : LAQ_r_aq_rl<0b001, "lh">;
50+
defm LW : LAQ_r_aq_rl<0b010, "lw">;
51+
defm SB : SRL_r_aq_rl<0b000, "sb">;
52+
defm SH : SRL_r_aq_rl<0b001, "sh">;
53+
defm SW : SRL_r_aq_rl<0b010, "sw">;
54+
} // Predicates = [HasStdExtZalasr]
55+
56+
let Predicates = [HasStdExtZalasr, IsRV64] in {
57+
defm LD : LAQ_r_aq_rl<0b011, "ld">;
58+
defm SD : SRL_r_aq_rl<0b011, "sd">;
59+
} // Predicates = [HasStdExtZalasr, IsRV64]

llvm/test/CodeGen/RISCV/attributes.ll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zvfbfwma %s -o - | FileCheck --check-prefixes=CHECK,RV32ZVFBFWMA %s
9696
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zaamo %s -o - | FileCheck --check-prefix=RV32ZAAMO %s
9797
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zacas %s -o - | FileCheck --check-prefix=RV32ZACAS %s
98+
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zalasr %s -o - | FileCheck --check-prefix=RV32ZALASR %s
9899
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zalrsc %s -o - | FileCheck --check-prefix=RV32ZALRSC %s
99100
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zicfilp %s -o - | FileCheck --check-prefix=RV32ZICFILP %s
100101
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zabha %s -o - | FileCheck --check-prefix=RV32ZABHA %s
@@ -200,6 +201,7 @@
200201
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zvfbfwma %s -o - | FileCheck --check-prefixes=CHECK,RV64ZVFBFWMA %s
201202
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zaamo %s -o - | FileCheck --check-prefix=RV64ZAAMO %s
202203
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zacas %s -o - | FileCheck --check-prefix=RV64ZACAS %s
204+
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zalasr %s -o - | FileCheck --check-prefix=RV64ZALASR %s
203205
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zalrsc %s -o - | FileCheck --check-prefix=RV64ZALRSC %s
204206
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zicfilp %s -o - | FileCheck --check-prefix=RV64ZICFILP %s
205207
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zabha %s -o - | FileCheck --check-prefix=RV64ZABHA %s
@@ -300,6 +302,7 @@
300302
; RV32ZVFBFWMA: .attribute 5, "rv32i2p1_f2p2_zicsr2p0_zfbfmin1p0_zve32f1p0_zve32x1p0_zvfbfmin1p0_zvfbfwma1p0_zvl32b1p0"
301303
; RV32ZAAMO: .attribute 5, "rv32i2p1_zaamo0p2"
302304
; RV32ZACAS: .attribute 5, "rv32i2p1_a2p1_zacas1p0"
305+
; RV32ZALASR: .attribute 5, "rv32i2p1_zalasr0p1"
303306
; RV32ZALRSC: .attribute 5, "rv32i2p1_zalrsc0p2"
304307
; RV32ZICFILP: .attribute 5, "rv32i2p1_zicfilp0p4"
305308
; RV32ZABHA: .attribute 5, "rv32i2p1_a2p1_zabha1p0"
@@ -404,6 +407,7 @@
404407
; RV64ZVFBFWMA: .attribute 5, "rv64i2p1_f2p2_zicsr2p0_zfbfmin1p0_zve32f1p0_zve32x1p0_zvfbfmin1p0_zvfbfwma1p0_zvl32b1p0"
405408
; RV64ZAAMO: .attribute 5, "rv64i2p1_zaamo0p2"
406409
; RV64ZACAS: .attribute 5, "rv64i2p1_a2p1_zacas1p0"
410+
; RV64ZALASR: .attribute 5, "rv64i2p1_zalasr0p1"
407411
; RV64ZALRSC: .attribute 5, "rv64i2p1_zalrsc0p2"
408412
; RV64ZICFILP: .attribute 5, "rv64i2p1_zicfilp0p4"
409413
; RV64ZABHA: .attribute 5, "rv64i2p1_a2p1_zabha1p0"

llvm/test/MC/RISCV/attribute-arch.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,9 @@
309309
.attribute arch, "rv32izacas1p0"
310310
# CHECK: attribute 5, "rv32i2p1_a2p1_zacas1p0"
311311

312+
.attribute arch, "rv32izalasr0p1"
313+
# CHECK: attribute 5, "rv32i2p1_zalasr0p1"
314+
312315
.attribute arch, "rv32i_xcvalu"
313316
# CHECK: attribute 5, "rv32i2p1_xcvalu1p0"
314317

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-zalasr < %s 2>&1 | FileCheck -check-prefixes=CHECK %s
2+
3+
# CHECK: error: instruction requires the following: RV64I Base Instruction Set{{$}}
4+
ld.aq a1, (t0)
5+
6+
# CHECK: error: instruction requires the following: RV64I Base Instruction Set{{$}}
7+
ld.aqrl a1, (t0)
8+
9+
# CHECK: error: instruction requires the following: RV64I Base Instruction Set{{$}}
10+
sd.rl a1, (t0)
11+
12+
# CHECK: error: instruction requires the following: RV64I Base Instruction Set{{$}}
13+
sd.aqrl a1, (t0)
14+
15+
# CHECK: error: unrecognized instruction mnemonic
16+
lw. a1, (t0)
17+
18+
# CHECK: error: unrecognized instruction mnemonic
19+
lw.rl t3, 0(t5)
20+
21+
# CHECK: error: unrecognized instruction mnemonic
22+
lh.rlaq t4, (t6)
23+
24+
# CHECK: error: unrecognized instruction mnemonic
25+
sb. a1, (t0)
26+
27+
# CHECK: error: unrecognized instruction mnemonic
28+
sh.aq t3, 0(t5)
29+
30+
# CHECK: error: unrecognized instruction mnemonic
31+
sh.rlaq t4, (t6)
32+
33+
# CHECK: error: optional integer offset must be 0
34+
lw.aq zero, 1(a0)
35+
36+
# CHECK: error: optional integer offset must be 0
37+
sw.rl t1, 2(s0)
38+
39+
# CHECK: error: optional integer offset must be 0
40+
sb.aqrl sp, 3(s2)

llvm/test/MC/RISCV/rv32zalasr-valid.s

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zalasr -riscv-no-aliases -show-encoding \
2+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3+
# 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 %s
6+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zalasr -riscv-no-aliases -show-encoding \
7+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
8+
# 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 %s
11+
#
12+
# RUN: not llvm-mc -triple riscv32 \
13+
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
14+
# RUN: | FileCheck --check-prefixes=CHECK-NO-EXT %s
15+
# RUN: not llvm-mc -triple riscv64 \
16+
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
17+
# RUN: | FileCheck --check-prefixes=CHECK-NO-EXT %s
18+
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){{$}}
22+
lb.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){{$}}
27+
lh.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){{$}}
32+
lw.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){{$}}
37+
lb.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){{$}}
42+
lh.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){{$}}
47+
lw.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){{$}}
53+
sb.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){{$}}
58+
sh.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){{$}}
63+
sw.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){{$}}
68+
sb.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){{$}}
73+
sh.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){{$}}
78+
sw.aqrl t1, 0(a0)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# RUN: not llvm-mc -triple riscv64 -mattr=+experimental-zalasr < %s 2>&1 | FileCheck -check-prefixes=CHECK %s
2+
3+
# CHECK: error: unrecognized instruction mnemonic
4+
lw. a1, (t0)
5+
6+
# CHECK: error: unrecognized instruction mnemonic
7+
lw.rl t3, 0(t5)
8+
9+
# CHECK: error: unrecognized instruction mnemonic
10+
lh.rlaq t4, (t6)
11+
12+
# CHECK: error: unrecognized instruction mnemonic
13+
sb. a1, (t0)
14+
15+
# CHECK: error: unrecognized instruction mnemonic
16+
sh.aq t3, 0(t5)
17+
18+
# CHECK: error: unrecognized instruction mnemonic
19+
sh.rlaq t4, (t6)
20+
21+
# CHECK: error: optional integer offset must be 0
22+
lw.aq zero, 1(a0)
23+
24+
# CHECK: error: optional integer offset must be 0
25+
sw.rl t1, 2(s0)
26+
27+
# CHECK: error: optional integer offset must be 0
28+
sb.aqrl sp, 3(s2)

llvm/test/MC/RISCV/rv64zalasr-valid.s

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zalasr -riscv-no-aliases -show-encoding \
2+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -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 %s
6+
#
7+
# RUN: not llvm-mc -triple riscv64 \
8+
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
9+
# RUN: | FileCheck --check-prefixes=CHECK-NO-EXT %s
10+
11+
12+
# CHECK-ASM-AND-OBJ: ld.aq t1, (a0)
13+
# CHECK-ASM: encoding: [0x2f,0x33,0x05,0x34]
14+
# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}
15+
ld.aq t1, (a0)
16+
17+
# CHECK-ASM-AND-OBJ: ld.aqrl t1, (a0)
18+
# CHECK-ASM: encoding: [0x2f,0x33,0x05,0x36]
19+
# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}
20+
ld.aqrl t1, 0(a0)
21+
22+
23+
# CHECK-ASM-AND-OBJ: sd.rl t1, (a0)
24+
# CHECK-ASM: encoding: [0x2f,0x30,0x65,0x3a]
25+
# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}
26+
sd.rl t1, 0(a0)
27+
28+
# CHECK-ASM-AND-OBJ: sd.aqrl t1, (a0)
29+
# CHECK-ASM: encoding: [0x2f,0x30,0x65,0x3e]
30+
# CHECK-NO-EXT: error: instruction requires the following: 'Zalasr' (Load-Acquire and Store-Release Instructions){{$}}
31+
sd.aqrl t1, (a0)

llvm/unittests/Support/RISCVISAInfoTest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ Experimental extensions
857857
zaamo 0.2
858858
zabha 1.0
859859
zacas 1.0
860+
zalasr 0.1
860861
zalrsc 0.2
861862
zfbfmin 1.0
862863
zcmop 0.2

0 commit comments

Comments
 (0)