Skip to content

Commit 9300274

Browse files
committed
[RISCV][NFCI] Fix Xqci Line Endings
Changes the new files for `Xqci`, including `Xqcicsr` and `Xqcisls`, to use Unix line endings rather than Windows line endings.
1 parent baaf111 commit 9300274

File tree

5 files changed

+295
-295
lines changed

5 files changed

+295
-295
lines changed
Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
1-
//===---------------- RISCVInstrInfoXQci.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 vendor extensions defined by QUALCOMM.
10-
//
11-
//===----------------------------------------------------------------------===//
12-
13-
//===----------------------------------------------------------------------===//
14-
// Operand and SDNode transformation definitions.
15-
//===----------------------------------------------------------------------===//
16-
17-
//===----------------------------------------------------------------------===//
18-
// Instruction Formats
19-
//===----------------------------------------------------------------------===//
20-
21-
//===----------------------------------------------------------------------===//
22-
// Instruction Class Templates
23-
//===----------------------------------------------------------------------===//
24-
25-
let hasSideEffects = 0, mayLoad = 1, mayStore = 0 in {
26-
class QCILoad_ScaleIdx<bits<4> func4, string opcodestr>
27-
: RVInstRBase<0b111, OPC_CUSTOM_0,
28-
(outs GPR:$rd), (ins GPRMem:$rs1, GPRNoX0:$rs2, uimm3:$shamt),
29-
opcodestr, "$rd, $rs1, $rs2, $shamt"> {
30-
bits<3> shamt;
31-
let Inst{31-28} = func4;
32-
let Inst{27-25} = shamt;
33-
}
34-
}
35-
36-
let hasSideEffects = 0, mayLoad = 0, mayStore = 1 in {
37-
// rd corresponds to the source for the store 'rs3' described in the spec.
38-
class QCIStore_ScaleIdx<bits<4> func4, string opcodestr>
39-
: RVInstRBase<0b110, OPC_CUSTOM_1, (outs),
40-
(ins GPR:$rd, GPRMem:$rs1, GPRNoX0:$rs2, uimm3:$shamt),
41-
opcodestr, "$rd, $rs1, $rs2, $shamt"> {
42-
bits<3> shamt;
43-
let Inst{31-28} = func4;
44-
let Inst{27-25} = shamt;
45-
}
46-
}
47-
48-
//===----------------------------------------------------------------------===//
49-
// Instructions
50-
//===----------------------------------------------------------------------===//
51-
52-
let Predicates = [HasVendorXqcicsr, IsRV32], DecoderNamespace = "Xqcicsr" in {
53-
let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
54-
def QC_CSRRWR : RVInstR<0b1000110, 0b000, OPC_SYSTEM, (outs GPR:$rd),
55-
(ins GPR:$rs1, GPRNoX0:$rs2), "qc.csrrwr",
56-
"$rd, $rs1, $rs2">;
57-
58-
def QC_CSRRWRI : RVInstR<0b1000111, 0b000, OPC_SYSTEM, (outs GPR:$rd),
59-
(ins uimm5:$rs1, GPRNoX0:$rs2), "qc.csrrwri",
60-
"$rd, $rs1, $rs2">;
61-
} // hasSideEffects = 0, mayLoad = 0, mayStore = 0
62-
} // Predicates = [HasVendorXqcicsr, IsRV32], DecoderNamespace = "Xqcicsr"
63-
64-
let Predicates = [HasVendorXqcisls, IsRV32], DecoderNamespace = "Xqcisls" in {
65-
def QC_LRB : QCILoad_ScaleIdx<0b1000, "qc.lrb">;
66-
def QC_LRH : QCILoad_ScaleIdx<0b1001, "qc.lrh">;
67-
def QC_LRW : QCILoad_ScaleIdx<0b1010, "qc.lrw">;
68-
def QC_LRBU : QCILoad_ScaleIdx<0b1011, "qc.lrbu">;
69-
def QC_LRHU : QCILoad_ScaleIdx<0b1100, "qc.lrhu">;
70-
71-
def QC_SRB : QCIStore_ScaleIdx<0b1101, "qc.srb">;
72-
def QC_SRH : QCIStore_ScaleIdx<0b1110, "qc.srh">;
73-
def QC_SRW : QCIStore_ScaleIdx<0b1111, "qc.srw">;
74-
} // Predicates = [HasVendorXqcisls, IsRV32], DecoderNamespace = "Xqcisls"
1+
//===---------------- RISCVInstrInfoXQci.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 vendor extensions defined by QUALCOMM.
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
//===----------------------------------------------------------------------===//
14+
// Operand and SDNode transformation definitions.
15+
//===----------------------------------------------------------------------===//
16+
17+
//===----------------------------------------------------------------------===//
18+
// Instruction Formats
19+
//===----------------------------------------------------------------------===//
20+
21+
//===----------------------------------------------------------------------===//
22+
// Instruction Class Templates
23+
//===----------------------------------------------------------------------===//
24+
25+
let hasSideEffects = 0, mayLoad = 1, mayStore = 0 in {
26+
class QCILoad_ScaleIdx<bits<4> func4, string opcodestr>
27+
: RVInstRBase<0b111, OPC_CUSTOM_0,
28+
(outs GPR:$rd), (ins GPRMem:$rs1, GPRNoX0:$rs2, uimm3:$shamt),
29+
opcodestr, "$rd, $rs1, $rs2, $shamt"> {
30+
bits<3> shamt;
31+
let Inst{31-28} = func4;
32+
let Inst{27-25} = shamt;
33+
}
34+
}
35+
36+
let hasSideEffects = 0, mayLoad = 0, mayStore = 1 in {
37+
// rd corresponds to the source for the store 'rs3' described in the spec.
38+
class QCIStore_ScaleIdx<bits<4> func4, string opcodestr>
39+
: RVInstRBase<0b110, OPC_CUSTOM_1, (outs),
40+
(ins GPR:$rd, GPRMem:$rs1, GPRNoX0:$rs2, uimm3:$shamt),
41+
opcodestr, "$rd, $rs1, $rs2, $shamt"> {
42+
bits<3> shamt;
43+
let Inst{31-28} = func4;
44+
let Inst{27-25} = shamt;
45+
}
46+
}
47+
48+
//===----------------------------------------------------------------------===//
49+
// Instructions
50+
//===----------------------------------------------------------------------===//
51+
52+
let Predicates = [HasVendorXqcicsr, IsRV32], DecoderNamespace = "Xqcicsr" in {
53+
let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
54+
def QC_CSRRWR : RVInstR<0b1000110, 0b000, OPC_SYSTEM, (outs GPR:$rd),
55+
(ins GPR:$rs1, GPRNoX0:$rs2), "qc.csrrwr",
56+
"$rd, $rs1, $rs2">;
57+
58+
def QC_CSRRWRI : RVInstR<0b1000111, 0b000, OPC_SYSTEM, (outs GPR:$rd),
59+
(ins uimm5:$rs1, GPRNoX0:$rs2), "qc.csrrwri",
60+
"$rd, $rs1, $rs2">;
61+
} // hasSideEffects = 1, mayLoad = 0, mayStore = 0
62+
} // Predicates = [HasVendorXqcicsr, IsRV32], DecoderNamespace = "Xqcicsr"
63+
64+
let Predicates = [HasVendorXqcisls, IsRV32], DecoderNamespace = "Xqcisls" in {
65+
def QC_LRB : QCILoad_ScaleIdx<0b1000, "qc.lrb">;
66+
def QC_LRH : QCILoad_ScaleIdx<0b1001, "qc.lrh">;
67+
def QC_LRW : QCILoad_ScaleIdx<0b1010, "qc.lrw">;
68+
def QC_LRBU : QCILoad_ScaleIdx<0b1011, "qc.lrbu">;
69+
def QC_LRHU : QCILoad_ScaleIdx<0b1100, "qc.lrhu">;
70+
71+
def QC_SRB : QCIStore_ScaleIdx<0b1101, "qc.srb">;
72+
def QC_SRH : QCIStore_ScaleIdx<0b1110, "qc.srh">;
73+
def QC_SRW : QCIStore_ScaleIdx<0b1111, "qc.srw">;
74+
} // Predicates = [HasVendorXqcisls, IsRV32], DecoderNamespace = "Xqcisls"

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

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
# Xqcicsr - Qualcomm uC CSR Extension
2-
# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-xqcicsr < %s 2>&1 \
3-
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-PLUS %s
4-
# RUN: not llvm-mc -triple riscv32 -mattr=-experimental-xqcicsr < %s 2>&1 \
5-
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS %s
6-
7-
# CHECK: :[[@LINE+1]]:20: error: invalid operand for instruction
8-
qc.csrrwr x10, x5, x0
9-
10-
# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
11-
qc.csrrwr x10, x5
12-
13-
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicsr' (Qualcomm uC CSR Extension)
14-
qc.csrrwr x10, x5, x20
15-
16-
17-
# CHECK: :[[@LINE+1]]:21: error: invalid operand for instruction
18-
qc.csrrwri x20, 31, x0
19-
20-
# CHECK-PLUS: :[[@LINE+1]]:17: error: immediate must be an integer in the range [0, 31]
21-
qc.csrrwri x20, 45, x12
22-
23-
# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
24-
qc.csrrwri x20, 23
25-
26-
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicsr' (Qualcomm uC CSR Extension)
27-
qc.csrrwri x30, 31, x12
1+
# Xqcicsr - Qualcomm uC CSR Extension
2+
# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-xqcicsr < %s 2>&1 \
3+
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-PLUS %s
4+
# RUN: not llvm-mc -triple riscv32 -mattr=-experimental-xqcicsr < %s 2>&1 \
5+
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS %s
6+
7+
# CHECK: :[[@LINE+1]]:20: error: invalid operand for instruction
8+
qc.csrrwr x10, x5, x0
9+
10+
# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
11+
qc.csrrwr x10, x5
12+
13+
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicsr' (Qualcomm uC CSR Extension)
14+
qc.csrrwr x10, x5, x20
15+
16+
17+
# CHECK: :[[@LINE+1]]:21: error: invalid operand for instruction
18+
qc.csrrwri x20, 31, x0
19+
20+
# CHECK-PLUS: :[[@LINE+1]]:17: error: immediate must be an integer in the range [0, 31]
21+
qc.csrrwri x20, 45, x12
22+
23+
# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
24+
qc.csrrwri x20, 23
25+
26+
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicsr' (Qualcomm uC CSR Extension)
27+
qc.csrrwri x30, 31, x12

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# Xqcicsr - Qualcomm uC CSR Extension
2-
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-xqcicsr -riscv-no-aliases -show-encoding \
3-
# RUN: | FileCheck -check-prefixes=CHECK-ENC,CHECK-INST %s
4-
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcicsr < %s \
5-
# RUN: | llvm-objdump --mattr=+experimental-xqcicsr -M no-aliases --no-print-imm-hex -d - \
6-
# RUN: | FileCheck -check-prefix=CHECK-INST %s
7-
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-xqcicsr -show-encoding \
8-
# RUN: | FileCheck -check-prefixes=CHECK-ENC,CHECK-INST %s
9-
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcicsr < %s \
10-
# RUN: | llvm-objdump --mattr=+experimental-xqcicsr --no-print-imm-hex -d - \
11-
# RUN: | FileCheck -check-prefix=CHECK-INST %s
12-
13-
# CHECK-INST: qc.csrrwr a0, t0, s4
14-
# CHECK-ENC: encoding: [0x73,0x85,0x42,0x8d]
15-
qc.csrrwr x10, x5, x20
16-
17-
# CHECK-INST: qc.csrrwri s4, 31, a2
18-
# CHECK-ENC: encoding: [0x73,0x8a,0xcf,0x8e]
19-
qc.csrrwri x20, 31, x12
1+
# Xqcicsr - Qualcomm uC CSR Extension
2+
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-xqcicsr -riscv-no-aliases -show-encoding \
3+
# RUN: | FileCheck -check-prefixes=CHECK-ENC,CHECK-INST %s
4+
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcicsr < %s \
5+
# RUN: | llvm-objdump --mattr=+experimental-xqcicsr -M no-aliases --no-print-imm-hex -d - \
6+
# RUN: | FileCheck -check-prefix=CHECK-INST %s
7+
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-xqcicsr -show-encoding \
8+
# RUN: | FileCheck -check-prefixes=CHECK-ENC,CHECK-INST %s
9+
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcicsr < %s \
10+
# RUN: | llvm-objdump --mattr=+experimental-xqcicsr --no-print-imm-hex -d - \
11+
# RUN: | FileCheck -check-prefix=CHECK-INST %s
12+
13+
# CHECK-INST: qc.csrrwr a0, t0, s4
14+
# CHECK-ENC: encoding: [0x73,0x85,0x42,0x8d]
15+
qc.csrrwr x10, x5, x20
16+
17+
# CHECK-INST: qc.csrrwri s4, 31, a2
18+
# CHECK-ENC: encoding: [0x73,0x8a,0xcf,0x8e]
19+
qc.csrrwri x20, 31, x12

0 commit comments

Comments
 (0)