Skip to content

Commit 2d06887

Browse files
authored
[RISCV] Renaming muladdi to muliadd as per v0.5 spec. (#124237)
muliadd is more relevant to the operation performed, i.e. multiply by immediate. The latest spec can be found at: https://github.com/quic/riscv-unified-db/releases/latest
1 parent bd8578b commit 2d06887

File tree

8 files changed

+30
-30
lines changed

8 files changed

+30
-30
lines changed

clang/test/Driver/print-supported-extensions-riscv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
// CHECK-NEXT: ssctr 1.0 'Ssctr' (Control Transfer Records Supervisor Level)
192192
// CHECK-NEXT: svukte 0.3 'Svukte' (Address-Independent Latency of User-Mode Faults to Supervisor Addresses)
193193
// CHECK-NEXT: xqcia 0.2 'Xqcia' (Qualcomm uC Arithmetic Extension)
194-
// CHECK-NEXT: xqciac 0.2 'Xqciac' (Qualcomm uC Load-Store Address Calculation Extension)
194+
// CHECK-NEXT: xqciac 0.3 'Xqciac' (Qualcomm uC Load-Store Address Calculation Extension)
195195
// CHECK-NEXT: xqcicli 0.2 'Xqcicli' (Qualcomm uC Conditional Load Immediate Extension)
196196
// CHECK-NEXT: xqcicm 0.2 'Xqcicm' (Qualcomm uC Conditional Move Extension)
197197
// CHECK-NEXT: xqcics 0.2 'Xqcics' (Qualcomm uC Conditional Select Extension)

llvm/docs/RISCVUsage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ The current vendor extensions supported are:
433433
LLVM implements `version 0.2 of the Qualcomm uC Arithmetic extension specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm. All instructions are prefixed with `qc.` as described in the specification. These instructions are only available for riscv32.
434434

435435
``experimental-Xqciac``
436-
LLVM implements `version 0.2 of the Qualcomm uC Load-Store Address Calculation extension specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm. All instructions are prefixed with `qc.` as described in the specification. These instructions are only available for riscv32.
436+
LLVM implements `version 0.3 of the Qualcomm uC Load-Store Address Calculation extension specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm. All instructions are prefixed with `qc.` as described in the specification. These instructions are only available for riscv32.
437437

438438
``experimental-Xqcicli``
439439
LLVM implements `version 0.2 of the Qualcomm uC Conditional Load Immediate extension specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm. All instructions are prefixed with `qc.` as described in the specification. These instructions are only available for riscv32.

llvm/lib/Target/RISCV/RISCVFeatures.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@ def HasVendorXqcilsm
12791279
"'Xqcilsm' (Qualcomm uC Load Store Multiple Extension)">;
12801280

12811281
def FeatureVendorXqciac
1282-
: RISCVExperimentalExtension<0, 2, "Qualcomm uC Load-Store Address Calculation Extension",
1282+
: RISCVExperimentalExtension<0, 3, "Qualcomm uC Load-Store Address Calculation Extension",
12831283
[FeatureStdExtZca]>;
12841284
def HasVendorXqciac
12851285
: Predicate<"Subtarget->hasVendorXqciac()">,

llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@ let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
299299

300300
let Predicates = [HasVendorXqciac, IsRV32], DecoderNamespace = "Xqciac" in {
301301
let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
302-
def QC_C_MULADDI : RVInst16CL<0b001, 0b10, (outs GPRC:$rd_wb),
302+
def QC_C_MULIADD : RVInst16CL<0b001, 0b10, (outs GPRC:$rd_wb),
303303
(ins GPRC:$rd, GPRC:$rs1, uimm5:$uimm),
304-
"qc.c.muladdi", "$rd, $rs1, $uimm"> {
304+
"qc.c.muliadd", "$rd, $rs1, $uimm"> {
305305
let Constraints = "$rd = $rd_wb";
306306
bits<5> uimm;
307307

@@ -310,9 +310,9 @@ let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
310310
let Inst{5} = uimm{4};
311311
}
312312

313-
def QC_MULADDI : RVInstI<0b110, OPC_CUSTOM_0, (outs GPRNoX0:$rd_wb),
313+
def QC_MULIADD : RVInstI<0b110, OPC_CUSTOM_0, (outs GPRNoX0:$rd_wb),
314314
(ins GPRNoX0:$rd, GPRNoX0:$rs1, simm12:$imm12),
315-
"qc.muladdi", "$rd, $rs1, $imm12"> {
315+
"qc.muliadd", "$rd, $rs1, $imm12"> {
316316
let Constraints = "$rd = $rd_wb";
317317
}
318318

llvm/test/CodeGen/RISCV/attributes.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@
398398
; RV32XTHEADSYNC: .attribute 5, "rv32i2p1_xtheadsync1p0"
399399
; RV32XWCHC: .attribute 5, "rv32i2p1_xwchc2p2"
400400
; RV32XQCIA: .attribute 5, "rv32i2p1_xqcia0p2"
401-
; RV32XQCIAC: .attribute 5, "rv32i2p1_zca1p0_xqciac0p2"
401+
; RV32XQCIAC: .attribute 5, "rv32i2p1_zca1p0_xqciac0p3"
402402
; RV32XQCICLI: .attribute 5, "rv32i2p1_xqcicli0p2"
403403
; RV32XQCICM: .attribute 5, "rv32i2p1_zca1p0_xqcicm0p2"
404404
; RV32XQCICS: .attribute 5, "rv32i2p1_xqcics0p2"

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,29 @@
55
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-EXT %s
66

77
# CHECK: :[[@LINE+1]]:14: error: invalid operand for instruction
8-
qc.c.muladdi x5, x10, 4
8+
qc.c.muliadd x5, x10, 4
99

1010
# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
11-
qc.c.muladdi x15
11+
qc.c.muliadd x15
1212

1313
# CHECK-IMM: :[[@LINE+1]]:24: error: immediate must be an integer in the range [0, 31]
14-
qc.c.muladdi x10, x15, 32
14+
qc.c.muliadd x10, x15, 32
1515

1616
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciac' (Qualcomm uC Load-Store Address Calculation Extension)
17-
qc.c.muladdi x10, x15, 20
17+
qc.c.muliadd x10, x15, 20
1818

1919

2020
# CHECK: :[[@LINE+1]]:12: error: invalid operand for instruction
21-
qc.muladdi x0, x10, 1048577
21+
qc.muliadd x0, x10, 1048577
2222

2323
# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
24-
qc.muladdi x10
24+
qc.muliadd x10
2525

2626
# CHECK-IMM: :[[@LINE+1]]:22: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
27-
qc.muladdi x10, x15, 8589934592
27+
qc.muliadd x10, x15, 8589934592
2828

2929
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciac' (Qualcomm uC Load-Store Address Calculation Extension)
30-
qc.muladdi x10, x15, 577
30+
qc.muliadd x10, x15, 577
3131

3232

3333
# CHECK: :[[@LINE+1]]:11: error: invalid operand for instruction

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,30 @@
1010
# RUN: | llvm-objdump --mattr=+experimental-xqciac --no-print-imm-hex -d - \
1111
# RUN: | FileCheck -check-prefix=CHECK-INST %s
1212

13-
# CHECK-INST: qc.c.muladdi a0, a1, 0
13+
# CHECK-INST: qc.c.muliadd a0, a1, 0
1414
# CHECK-ENC: encoding: [0x8a,0x21]
15-
qc.c.muladdi x10, x11, 0
15+
qc.c.muliadd x10, x11, 0
1616

17-
# CHECK-INST: qc.c.muladdi a0, a1, 31
17+
# CHECK-INST: qc.c.muliadd a0, a1, 31
1818
# CHECK-ENC: encoding: [0xea,0x3d]
19-
qc.c.muladdi x10, x11, 31
19+
qc.c.muliadd x10, x11, 31
2020

21-
# CHECK-INST: qc.c.muladdi a0, a1, 16
21+
# CHECK-INST: qc.c.muliadd a0, a1, 16
2222
# CHECK-ENC: encoding: [0xaa,0x21]
23-
qc.c.muladdi x10, x11, 16
23+
qc.c.muliadd x10, x11, 16
2424

2525

26-
# CHECK-INST: qc.muladdi tp, t0, 1234
26+
# CHECK-INST: qc.muliadd tp, t0, 1234
2727
# CHECK-ENC: encoding: [0x0b,0xe2,0x22,0x4d]
28-
qc.muladdi x4, x5, 1234
28+
qc.muliadd x4, x5, 1234
2929

30-
# CHECK-INST: qc.muladdi a0, a1, -2048
30+
# CHECK-INST: qc.muliadd a0, a1, -2048
3131
# CHECK-ENC: encoding: [0x0b,0xe5,0x05,0x80]
32-
qc.muladdi x10, x11, -2048
32+
qc.muliadd x10, x11, -2048
3333

34-
# CHECK-INST: qc.muladdi a0, a1, 2047
34+
# CHECK-INST: qc.muliadd a0, a1, 2047
3535
# CHECK-ENC: encoding: [0x0b,0xe5,0xf5,0x7f]
36-
qc.muladdi x10, x11, 2047
36+
qc.muliadd x10, x11, 2047
3737

3838

3939
# CHECK-INST: qc.shladd tp, t0, t1, 12

llvm/unittests/TargetParser/RISCVISAInfoTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ TEST(ParseArchString, RejectsConflictingExtensions) {
654654
}
655655

656656
for (StringRef Input :
657-
{"rv64i_xqcisls0p2", "rv64i_xqcia0p2", "rv64i_xqciac0p2",
657+
{"rv64i_xqcisls0p2", "rv64i_xqcia0p2", "rv64i_xqciac0p3",
658658
"rv64i_xqcicsr0p2", "rv64i_xqcilsm0p2", "rv64i_xqcicm0p2",
659659
"rv64i_xqcics0p2", "rv64i_xqcicli0p2", "rv64i_xqciint0p2",
660660
"rv64i_xqcilo0p2"}) {
@@ -1117,7 +1117,7 @@ Experimental extensions
11171117
ssctr 1.0
11181118
svukte 0.3
11191119
xqcia 0.2
1120-
xqciac 0.2
1120+
xqciac 0.3
11211121
xqcicli 0.2
11221122
xqcicm 0.2
11231123
xqcics 0.2

0 commit comments

Comments
 (0)