Skip to content

Commit 8be079c

Browse files
authored
[RISCV] Bump Zaamo and Zalrsc to version 1.0 (#91556)
The ratified information can be found here: https://wiki.riscv.org/display/HOME/Ratified+Extensions
1 parent 64aafd6 commit 8be079c

14 files changed

+59
-59
lines changed

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

+18-18
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@
7979
// CHECK-NOT: __riscv_xventanacondops {{.*$}}
8080
// CHECK-NOT: __riscv_za128rs {{.*$}}
8181
// CHECK-NOT: __riscv_za64rs {{.*$}}
82+
// CHECK-NOT: __riscv_zaamo {{.*$}}
8283
// CHECK-NOT: __riscv_zacas {{.*$}}
84+
// CHECK-NOT: __riscv_zalrsc {{.*$}}
8385
// CHECK-NOT: __riscv_zama16b {{.*$}}
8486
// CHECK-NOT: __riscv_zawrs {{.*$}}
8587
// CHECK-NOT: __riscv_zba {{.*$}}
@@ -174,10 +176,8 @@
174176
// CHECK-NOT: __riscv_sspm{{.*$}}
175177
// CHECK-NOT: __riscv_ssqosid{{.*$}}
176178
// CHECK-NOT: __riscv_supm{{.*$}}
177-
// CHECK-NOT: __riscv_zaamo {{.*$}}
178179
// CHECK-NOT: __riscv_zabha {{.*$}}
179180
// CHECK-NOT: __riscv_zalasr {{.*$}}
180-
// CHECK-NOT: __riscv_zalrsc {{.*$}}
181181
// CHECK-NOT: __riscv_zfbfmin {{.*$}}
182182
// CHECK-NOT: __riscv_zicfilp {{.*$}}
183183
// CHECK-NOT: __riscv_zicfiss {{.*$}}
@@ -707,6 +707,14 @@
707707
// RUN: -o - | FileCheck --check-prefix=CHECK-ZA64RS-EXT %s
708708
// CHECK-ZA64RS-EXT: __riscv_za64rs 1000000{{$}}
709709

710+
// RUN: %clang --target=riscv32 \
711+
// RUN: -march=rv32i_zaamo1p0 -E -dM %s \
712+
// RUN: -o - | FileCheck --check-prefix=CHECK-ZAAMO-EXT %s
713+
// RUN: %clang --target=riscv64 \
714+
// RUN: -march=rv64i_zaamo1p0 -E -dM %s \
715+
// RUN: -o - | FileCheck --check-prefix=CHECK-ZAAMO-EXT %s
716+
// CHECK-ZAAMO-EXT: __riscv_zaamo 1000000{{$}}
717+
710718
// RUN: %clang --target=riscv32 \
711719
// RUN: -march=rv32ia_zacas1p0 -E -dM %s \
712720
// RUN: -o - | FileCheck --check-prefix=CHECK-ZACAS-EXT %s
@@ -715,6 +723,14 @@
715723
// RUN: -o - | FileCheck --check-prefix=CHECK-ZACAS-EXT %s
716724
// CHECK-ZACAS-EXT: __riscv_zacas 1000000{{$}}
717725

726+
// RUN: %clang --target=riscv32 \
727+
// RUN: -march=rv32i_zalrsc1p0 -E -dM %s \
728+
// RUN: -o - | FileCheck --check-prefix=CHECK-ZALRSC-EXT %s
729+
// RUN: %clang --target=riscv64 \
730+
// RUN: -march=rv64i_zalrsc1p0 -E -dM %s \
731+
// RUN: -o - | FileCheck --check-prefix=CHECK-ZALRSC-EXT %s
732+
// CHECK-ZALRSC-EXT: __riscv_zalrsc 1000000{{$}}
733+
718734
// RUN: %clang --target=riscv32 -march=rv32izama16b -x c -E -dM %s \
719735
// RUN: -o - | FileCheck --check-prefix=CHECK-ZAMA16B-EXT %s
720736
// RUN: %clang --target=riscv64 -march=rv64izama16b -x c -E -dM %s \
@@ -1554,14 +1570,6 @@
15541570
// CHECK-ZVKT-EXT: __riscv_zvkt 1000000{{$}}
15551571

15561572
// Experimental extensions
1557-
// RUN: %clang --target=riscv32 -menable-experimental-extensions \
1558-
// RUN: -march=rv32i_zaamo0p2 -E -dM %s \
1559-
// RUN: -o - | FileCheck --check-prefix=CHECK-ZAAMO-EXT %s
1560-
// RUN: %clang --target=riscv64 -menable-experimental-extensions \
1561-
// RUN: -march=rv64i_zaamo0p2 -E -dM %s \
1562-
// RUN: -o - | FileCheck --check-prefix=CHECK-ZAAMO-EXT %s
1563-
// CHECK-ZAAMO-EXT: __riscv_zaamo 2000{{$}}
1564-
15651573
// RUN: %clang --target=riscv32 -menable-experimental-extensions \
15661574
// RUN: -march=rv32ia_zabha1p0 -E -dM %s \
15671575
// RUN: -o - | FileCheck --check-prefix=CHECK-ZABHA-EXT %s
@@ -1578,14 +1586,6 @@
15781586
// RUN: -o - | FileCheck --check-prefix=CHECK-ZALASR-EXT %s
15791587
// CHECK-ZALASR-EXT: __riscv_zalasr 1000{{$}}
15801588

1581-
// RUN: %clang --target=riscv32 -menable-experimental-extensions \
1582-
// RUN: -march=rv32i_zalrsc0p2 -E -dM %s \
1583-
// RUN: -o - | FileCheck --check-prefix=CHECK-ZALRSC-EXT %s
1584-
// RUN: %clang --target=riscv64 -menable-experimental-extensions \
1585-
// RUN: -march=rv64i_zalrsc0p2 -E -dM %s \
1586-
// RUN: -o - | FileCheck --check-prefix=CHECK-ZALRSC-EXT %s
1587-
// CHECK-ZALRSC-EXT: __riscv_zalrsc 2000{{$}}
1588-
15891589
// RUN: %clang --target=riscv32 -menable-experimental-extensions \
15901590
// RUN: -march=rv32izfbfmin1p0 -E -dM %s \
15911591
// RUN: -o - | FileCheck --check-prefix=CHECK-ZFBFMIN-EXT %s

llvm/docs/RISCVUsage.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ on support follow.
119119
``V`` Supported
120120
``Za128rs`` Supported (`See note <#riscv-profiles-extensions-note>`__)
121121
``Za64rs`` Supported (`See note <#riscv-profiles-extensions-note>`__)
122+
``Zaamo`` Assembly Support
122123
``Zacas`` Supported (`See note <#riscv-zacas-note>`__)
124+
``Zalrsc`` Assembly Support
123125
``Zama16b`` Supported (`See note <#riscv-profiles-extensions-note>`__)
124126
``Zawrs`` Assembly Support
125127
``Zba`` Supported
@@ -275,9 +277,6 @@ The primary goal of experimental support is to assist in the process of ratifica
275277
``experimental-ztso``
276278
LLVM implements the `v0.1 proposed specification <https://github.com/riscv/riscv-isa-manual/releases/download/draft-20220723-10eea63/riscv-spec.pdf>`__ (see Chapter 25). The mapping from the C/C++ memory model to Ztso has not yet been ratified in any standards document. There are multiple possible mappings, and they are *not* mutually ABI compatible. The mapping LLVM implements is ABI compatible with the default WMO mapping. This mapping may change and there is *explicitly* no ABI stability offered while the extension remains in experimental status. User beware.
277279

278-
``experimental-zaamo``, ``experimental-zalrsc``
279-
LLVM implements the `v0.2 proposed specification <https://github.com/riscv/riscv-zaamo-zalrsc/releases/tag/v0.2>`__.
280-
281280
To use an experimental extension from `clang`, you must add `-menable-experimental-extensions` to the command line, and specify the exact version of the experimental extension you are using. To use an experimental extension with LLVM's internal developer tools (e.g. `llc`, `llvm-objdump`, `llvm-mc`), you must prefix the extension name with `experimental-`. Note that you don't need to specify the version with internal tools, and shouldn't include the `experimental-` prefix with `clang`.
282281

283282
Vendor Extensions

llvm/docs/ReleaseNotes.rst

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ Changes to the RISC-V Backend
129129
* llvm-objdump now prints disassembled opcode bytes in groups of 2 or 4 bytes to
130130
match GNU objdump. The bytes within the groups are in big endian order.
131131
* Added smstateen extension to -march. CSR names for smstateen were already supported.
132+
* Zaamo and Zalrsc are no longer experimental.
132133

133134
Changes to the WebAssembly Backend
134135
----------------------------------

llvm/lib/Target/RISCV/RISCVFeatures.td

+4-4
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ def FeatureStdExtZa128rs : RISCVExtension<"za128rs", 1, 0,
211211
"'Za128rs' (Reservation Set Size of at Most 128 Bytes)">;
212212

213213
def FeatureStdExtZaamo
214-
: RISCVExperimentalExtension<"zaamo", 0, 2,
215-
"'Zaamo' (Atomic Memory Operations)">;
214+
: RISCVExtension<"zaamo", 1, 0,
215+
"'Zaamo' (Atomic Memory Operations)">;
216216
def HasStdExtAOrZaamo
217217
: Predicate<"Subtarget->hasStdExtA() || Subtarget->hasStdExtZaamo()">,
218218
AssemblerPredicate<(any_of FeatureStdExtA, FeatureStdExtZaamo),
@@ -242,8 +242,8 @@ def HasStdExtZalasr : Predicate<"Subtarget->hasStdExtZalasr()">,
242242
"'Zalasr' (Load-Acquire and Store-Release Instructions)">;
243243

244244
def FeatureStdExtZalrsc
245-
: RISCVExperimentalExtension<"zalrsc", 0, 2,
246-
"'Zalrsc' (Load-Reserved/Store-Conditional)">;
245+
: RISCVExtension<"zalrsc", 1, 0,
246+
"'Zalrsc' (Load-Reserved/Store-Conditional)">;
247247
def HasStdExtAOrZalrsc
248248
: Predicate<"Subtarget->hasStdExtA() || Subtarget->hasStdExtZalrsc()">,
249249
AssemblerPredicate<(any_of FeatureStdExtA, FeatureStdExtZalrsc),

llvm/test/CodeGen/RISCV/attributes.ll

+8-8
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
; RUN: llc -mtriple=riscv32 -mattr=+xtheadmemidx %s -o - | FileCheck --check-prefix=RV32XTHEADMEMIDX %s
7676
; RUN: llc -mtriple=riscv32 -mattr=+xtheadmempair %s -o - | FileCheck --check-prefix=RV32XTHEADMEMPAIR %s
7777
; RUN: llc -mtriple=riscv32 -mattr=+xtheadsync %s -o - | FileCheck --check-prefix=RV32XTHEADSYNC %s
78+
; RUN: llc -mtriple=riscv32 -mattr=+zaamo %s -o - | FileCheck --check-prefix=RV32ZAAMO %s
79+
; RUN: llc -mtriple=riscv32 -mattr=+zalrsc %s -o - | FileCheck --check-prefix=RV32ZALRSC %s
7880
; RUN: llc -mtriple=riscv32 -mattr=+zca %s -o - | FileCheck --check-prefixes=CHECK,RV32ZCA %s
7981
; RUN: llc -mtriple=riscv32 -mattr=+zcb %s -o - | FileCheck --check-prefixes=CHECK,RV32ZCB %s
8082
; RUN: llc -mtriple=riscv32 -mattr=+zcd %s -o - | FileCheck --check-prefixes=CHECK,RV32ZCD %s
@@ -112,10 +114,8 @@
112114
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zfbfmin %s -o - | FileCheck --check-prefixes=CHECK,RV32ZFBFMIN %s
113115
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zvfbfmin %s -o - | FileCheck --check-prefixes=CHECK,RV32ZVFBFMIN %s
114116
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zvfbfwma %s -o - | FileCheck --check-prefixes=CHECK,RV32ZVFBFWMA %s
115-
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zaamo %s -o - | FileCheck --check-prefix=RV32ZAAMO %s
116117
; RUN: llc -mtriple=riscv32 -mattr=+a,zacas %s -o - | FileCheck --check-prefix=RV32ZACAS %s
117118
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zalasr %s -o - | FileCheck --check-prefix=RV32ZALASR %s
118-
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zalrsc %s -o - | FileCheck --check-prefix=RV32ZALRSC %s
119119
; RUN: llc -mtriple=riscv32 -mattr=+zama16b %s -o - | FileCheck --check-prefixes=CHECK,RV32ZAMA16B %s
120120
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zicfilp %s -o - | FileCheck --check-prefix=RV32ZICFILP %s
121121
; RUN: llc -mtriple=riscv32 -mattr=+a,+experimental-zabha %s -o - | FileCheck --check-prefix=RV32ZABHA %s
@@ -205,6 +205,8 @@
205205
; RUN: llc -mtriple=riscv64 -mattr=+zama16b %s -o - | FileCheck --check-prefixes=CHECK,RV64ZAMA16B %s
206206
; RUN: llc -mtriple=riscv64 -mattr=+zawrs %s -o - | FileCheck --check-prefixes=CHECK,RV64ZAWRS %s
207207
; RUN: llc -mtriple=riscv64 -mattr=+experimental-ztso %s -o - | FileCheck --check-prefixes=CHECK,RV64ZTSO %s
208+
; RUN: llc -mtriple=riscv64 -mattr=+zaamo %s -o - | FileCheck --check-prefix=RV64ZAAMO %s
209+
; RUN: llc -mtriple=riscv64 -mattr=+zalrsc %s -o - | FileCheck --check-prefix=RV64ZALRSC %s
208210
; RUN: llc -mtriple=riscv64 -mattr=+zca %s -o - | FileCheck --check-prefixes=CHECK,RV64ZCA %s
209211
; RUN: llc -mtriple=riscv64 -mattr=+zcb %s -o - | FileCheck --check-prefixes=CHECK,RV64ZCB %s
210212
; RUN: llc -mtriple=riscv64 -mattr=+zcd %s -o - | FileCheck --check-prefixes=CHECK,RV64ZCD %s
@@ -245,10 +247,8 @@
245247
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zfbfmin %s -o - | FileCheck --check-prefixes=CHECK,RV64ZFBFMIN %s
246248
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zvfbfmin %s -o - | FileCheck --check-prefixes=CHECK,RV64ZVFBFMIN %s
247249
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zvfbfwma %s -o - | FileCheck --check-prefixes=CHECK,RV64ZVFBFWMA %s
248-
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zaamo %s -o - | FileCheck --check-prefix=RV64ZAAMO %s
249250
; RUN: llc -mtriple=riscv64 -mattr=+a,zacas %s -o - | FileCheck --check-prefix=RV64ZACAS %s
250251
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zalasr %s -o - | FileCheck --check-prefix=RV64ZALASR %s
251-
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zalrsc %s -o - | FileCheck --check-prefix=RV64ZALRSC %s
252252
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zicfilp %s -o - | FileCheck --check-prefix=RV64ZICFILP %s
253253
; RUN: llc -mtriple=riscv64 -mattr=+a,+experimental-zabha %s -o - | FileCheck --check-prefix=RV64ZABHA %s
254254
; RUN: llc -mtriple=riscv64 -mattr=+experimental-ssnpm %s -o - | FileCheck --check-prefix=RV64SSNPM %s
@@ -347,6 +347,8 @@
347347
; RV32XTHEADMEMIDX: .attribute 5, "rv32i2p1_xtheadmemidx1p0"
348348
; RV32XTHEADMEMPAIR: .attribute 5, "rv32i2p1_xtheadmempair1p0"
349349
; RV32XTHEADSYNC: .attribute 5, "rv32i2p1_xtheadsync1p0"
350+
; RV32ZAAMO: .attribute 5, "rv32i2p1_zaamo1p0"
351+
; RV32ZALRSC: .attribute 5, "rv32i2p1_zalrsc1p0"
350352
; RV32ZCA: .attribute 5, "rv32i2p1_zca1p0"
351353
; RV32ZCB: .attribute 5, "rv32i2p1_zca1p0_zcb1p0"
352354
; RV32ZCD: .attribute 5, "rv32i2p1_f2p2_d2p2_zicsr2p0_zca1p0_zcd1p0"
@@ -384,10 +386,8 @@
384386
; RV32ZFBFMIN: .attribute 5, "rv32i2p1_f2p2_zicsr2p0_zfbfmin1p0"
385387
; RV32ZVFBFMIN: .attribute 5, "rv32i2p1_f2p2_zicsr2p0_zve32f1p0_zve32x1p0_zvfbfmin1p0_zvl32b1p0"
386388
; RV32ZVFBFWMA: .attribute 5, "rv32i2p1_f2p2_zicsr2p0_zfbfmin1p0_zve32f1p0_zve32x1p0_zvfbfmin1p0_zvfbfwma1p0_zvl32b1p0"
387-
; RV32ZAAMO: .attribute 5, "rv32i2p1_zaamo0p2"
388389
; RV32ZACAS: .attribute 5, "rv32i2p1_a2p1_zacas1p0"
389390
; RV32ZALASR: .attribute 5, "rv32i2p1_zalasr0p1"
390-
; RV32ZALRSC: .attribute 5, "rv32i2p1_zalrsc0p2"
391391
; RV32ZAMA16B: .attribute 5, "rv32i2p1_zama16b1p0"
392392
; RV32ZICFILP: .attribute 5, "rv32i2p1_zicfilp0p4"
393393
; RV32ZABHA: .attribute 5, "rv32i2p1_a2p1_zabha1p0"
@@ -476,6 +476,8 @@
476476
; RV64XTHEADSYNC: .attribute 5, "rv64i2p1_xtheadsync1p0"
477477
; RV64XTHEADVDOT: .attribute 5, "rv64i2p1_f2p2_d2p2_v1p0_zicsr2p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0_xtheadvdot1p0"
478478
; RV64ZTSO: .attribute 5, "rv64i2p1_ztso0p1"
479+
; RV64ZAAMO: .attribute 5, "rv64i2p1_zaamo1p0"
480+
; RV64ZALRSC: .attribute 5, "rv64i2p1_zalrsc1p0"
479481
; RV64ZCA: .attribute 5, "rv64i2p1_zca1p0"
480482
; RV64ZCB: .attribute 5, "rv64i2p1_zca1p0_zcb1p0"
481483
; RV64ZCD: .attribute 5, "rv64i2p1_f2p2_d2p2_zicsr2p0_zca1p0_zcd1p0"
@@ -516,10 +518,8 @@
516518
; RV64ZFBFMIN: .attribute 5, "rv64i2p1_f2p2_zicsr2p0_zfbfmin1p0"
517519
; RV64ZVFBFMIN: .attribute 5, "rv64i2p1_f2p2_zicsr2p0_zve32f1p0_zve32x1p0_zvfbfmin1p0_zvl32b1p0"
518520
; RV64ZVFBFWMA: .attribute 5, "rv64i2p1_f2p2_zicsr2p0_zfbfmin1p0_zve32f1p0_zve32x1p0_zvfbfmin1p0_zvfbfwma1p0_zvl32b1p0"
519-
; RV64ZAAMO: .attribute 5, "rv64i2p1_zaamo0p2"
520521
; RV64ZACAS: .attribute 5, "rv64i2p1_a2p1_zacas1p0"
521522
; RV64ZALASR: .attribute 5, "rv64i2p1_zalasr0p1"
522-
; RV64ZALRSC: .attribute 5, "rv64i2p1_zalrsc0p2"
523523
; RV64ZICFILP: .attribute 5, "rv64i2p1_zicfilp0p4"
524524
; RV64ZABHA: .attribute 5, "rv64i2p1_a2p1_zabha1p0"
525525
; RV64SSNPM: .attribute 5, "rv64i2p1_ssnpm0p8"

llvm/test/MC/RISCV/rv32zaamo-invalid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: not llvm-mc -triple riscv32 -mattr=+a < %s 2>&1 | FileCheck %s
2-
# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-zaamo < %s 2>&1 | FileCheck %s
2+
# RUN: not llvm-mc -triple riscv32 -mattr=+zaamo < %s 2>&1 | FileCheck %s
33

44
# Final operand must have parentheses
55
amoswap.w a1, a2, a3 # CHECK: :[[@LINE]]:19: error: expected '(' or optional integer offset

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+a < %s \
99
# RUN: | llvm-objdump --mattr=+a -M no-aliases -d -r - \
1010
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
11-
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zaamo -riscv-no-aliases -show-encoding \
11+
# RUN: llvm-mc %s -triple=riscv32 -mattr=+zaamo -riscv-no-aliases -show-encoding \
1212
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
13-
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zaamo -riscv-no-aliases -show-encoding \
13+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+zaamo -riscv-no-aliases -show-encoding \
1414
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
15-
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zaamo < %s \
16-
# RUN: | llvm-objdump --mattr=+experimental-zaamo -M no-aliases -d -r - \
15+
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+zaamo < %s \
16+
# RUN: | llvm-objdump --mattr=+zaamo -M no-aliases -d -r - \
1717
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
18-
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zaamo < %s \
19-
# RUN: | llvm-objdump --mattr=+experimental-zaamo -M no-aliases -d -r - \
18+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zaamo < %s \
19+
# RUN: | llvm-objdump --mattr=+zaamo -M no-aliases -d -r - \
2020
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
2121

2222
# CHECK-ASM-AND-OBJ: amoswap.w a4, ra, (s0)

llvm/test/MC/RISCV/rv32zalrsc-invalid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: not llvm-mc -triple riscv32 -mattr=+a < %s 2>&1 | FileCheck %s
2-
# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-zalrsc < %s 2>&1 | FileCheck %s
2+
# RUN: not llvm-mc -triple riscv32 -mattr=+zalrsc < %s 2>&1 | FileCheck %s
33

44
# Final operand must have parentheses
55
lr.w a4, a5 # CHECK: :[[@LINE]]:10: error: expected '(' or optional integer offset

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+a < %s \
99
# RUN: | llvm-objdump --mattr=+a -M no-aliases -d -r - \
1010
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
11-
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zalrsc -riscv-no-aliases -show-encoding \
11+
# RUN: llvm-mc %s -triple=riscv32 -mattr=+zalrsc -riscv-no-aliases -show-encoding \
1212
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
13-
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zalrsc -riscv-no-aliases -show-encoding \
13+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+zalrsc -riscv-no-aliases -show-encoding \
1414
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
15-
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zalrsc < %s \
16-
# RUN: | llvm-objdump --mattr=+experimental-zalrsc -M no-aliases -d -r - \
15+
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+zalrsc < %s \
16+
# RUN: | llvm-objdump --mattr=+zalrsc -M no-aliases -d -r - \
1717
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
18-
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zalrsc < %s \
19-
# RUN: | llvm-objdump --mattr=+experimental-zalrsc -M no-aliases -d -r - \
18+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zalrsc < %s \
19+
# RUN: | llvm-objdump --mattr=+zalrsc -M no-aliases -d -r - \
2020
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
2121

2222
# CHECK-ASM-AND-OBJ: lr.w t0, (t1)

llvm/test/MC/RISCV/rv64zaamo-invalid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: not llvm-mc -triple riscv64 -mattr=+a < %s 2>&1 | FileCheck %s
2-
# RUN: not llvm-mc -triple riscv64 -mattr=+experimental-zaamo < %s 2>&1 | FileCheck %s
2+
# RUN: not llvm-mc -triple riscv64 -mattr=+zaamo < %s 2>&1 | FileCheck %s
33

44
# Final operand must have parentheses
55
amoswap.d a1, a2, a3 # CHECK: :[[@LINE]]:19: error: expected '(' or optional integer offset

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
# RUN: not llvm-mc -triple riscv32 -mattr=+a < %s 2>&1 \
88
# RUN: | FileCheck -check-prefix=CHECK-RV32 %s
99
#
10-
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zaamo -riscv-no-aliases -show-encoding \
10+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+zaamo -riscv-no-aliases -show-encoding \
1111
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
12-
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zaamo < %s \
13-
# RUN: | llvm-objdump --mattr=+experimental-zaamo -M no-aliases -d -r - \
12+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zaamo < %s \
13+
# RUN: | llvm-objdump --mattr=+zaamo -M no-aliases -d -r - \
1414
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
1515
#
16-
# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-zaamo < %s 2>&1 \
16+
# RUN: not llvm-mc -triple riscv32 -mattr=+zaamo < %s 2>&1 \
1717
# RUN: | FileCheck -check-prefix=CHECK-RV32 %s
1818

1919
# CHECK-ASM-AND-OBJ: amoswap.d a4, ra, (s0)

llvm/test/MC/RISCV/rv64zalrsc-invalid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: not llvm-mc -triple riscv64 -mattr=+a < %s 2>&1 | FileCheck %s
2-
# RUN: not llvm-mc -triple riscv64 -mattr=+experimental-zalrsc < %s 2>&1 | FileCheck %s
2+
# RUN: not llvm-mc -triple riscv64 -mattr=+zalrsc < %s 2>&1 | FileCheck %s
33

44
# Final operand must have parentheses
55
lr.d a4, a5 # CHECK: :[[@LINE]]:10: error: expected '(' or optional integer offset

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
# RUN: not llvm-mc -triple riscv32 -mattr=+a < %s 2>&1 \
88
# RUN: | FileCheck -check-prefix=CHECK-RV32 %s
99
#
10-
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zalrsc -riscv-no-aliases -show-encoding \
10+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+zalrsc -riscv-no-aliases -show-encoding \
1111
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
12-
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zalrsc < %s \
13-
# RUN: | llvm-objdump --mattr=+experimental-zalrsc -M no-aliases -d -r - \
12+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zalrsc < %s \
13+
# RUN: | llvm-objdump --mattr=+zalrsc -M no-aliases -d -r - \
1414
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
1515
#
16-
# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-zalrsc < %s 2>&1 \
16+
# RUN: not llvm-mc -triple riscv32 -mattr=+zalrsc < %s 2>&1 \
1717
# RUN: | FileCheck -check-prefix=CHECK-RV32 %s
1818

1919
# CHECK-ASM-AND-OBJ: lr.d t0, (t1)

llvm/unittests/TargetParser/RISCVISAInfoTest.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,9 @@ R"(All available -march extensions for RISC-V
934934
zmmul 1.0
935935
za128rs 1.0
936936
za64rs 1.0
937+
zaamo 1.0
937938
zacas 1.0
939+
zalrsc 1.0
938940
zama16b 1.0
939941
zawrs 1.0
940942
zfa 1.0
@@ -1060,10 +1062,8 @@ R"(All available -march extensions for RISC-V
10601062
Experimental extensions
10611063
zicfilp 0.4 This is a long dummy description
10621064
zicfiss 0.4
1063-
zaamo 0.2
10641065
zabha 1.0
10651066
zalasr 0.1
1066-
zalrsc 0.2
10671067
zfbfmin 1.0
10681068
ztso 0.1
10691069
zvfbfmin 1.0

0 commit comments

Comments
 (0)