Skip to content

Commit 38937ac

Browse files
committed
[RISCV] Check line and column for errors in rv(32/64)zcmp-invalid.s. NFC
Same for the Xqccmp version.
1 parent 4b67c53 commit 38937ac

File tree

4 files changed

+40
-40
lines changed

4 files changed

+40
-40
lines changed
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
# RUN: not llvm-mc -triple=riscv32 -mattr=+experimental-xqccmp -M no-aliases -show-encoding < %s 2>&1 \
22
# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s
33

4-
# CHECK-ERROR: error: invalid operand for instruction
4+
# CHECK-ERROR: :[[@LINE+1]]:14: error: invalid operand for instruction
55
qc.cm.mvsa01 a1, a2
66

7-
# CHECK-ERROR: error: rs1 and rs2 must be different
7+
# CHECK-ERROR: :[[@LINE+1]]:14: error: rs1 and rs2 must be different
88
qc.cm.mvsa01 s0, s0
99

10-
# CHECK-ERROR: error: invalid operand for instruction
10+
# CHECK-ERROR: :[[@LINE+1]]:14: error: invalid operand for instruction
1111
qc.cm.mva01s a1, a2
1212

13-
# CHECK-ERROR: error: invalid register list, {ra, s0-s10} or {x1, x8-x9, x18-x26} is not supported
13+
# CHECK-ERROR: :[[@LINE+1]]:26: error: invalid register list, {ra, s0-s10} or {x1, x8-x9, x18-x26} is not supported
1414
qc.cm.popretz {ra, s0-s10}, 112
1515

16-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [16, 64]
16+
# CHECK-ERROR: :[[@LINE+1]]:28: error: stack adjustment for register list must be a multiple of 16 bytes in the range [16, 64]
1717
qc.cm.popretz {ra, s0-s1}, 112
1818

19-
# CHECK-ERROR: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
19+
# CHECK-ERROR: :[[@LINE+1]]:18: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
2020
qc.cm.push {ra}, 16
2121

22-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
22+
# CHECK-ERROR: :[[@LINE+1]]:24: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
2323
qc.cm.pushfp {ra, s0}, 16
2424

25-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [16, 64]
25+
# CHECK-ERROR: :[[@LINE+1]]:25: error: stack adjustment for register list must be a multiple of 16 bytes in the range [16, 64]
2626
qc.cm.pop {ra, s0-s1}, -32
2727

28-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
28+
# CHECK-ERROR: :[[@LINE+1]]:19: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
2929
qc.cm.push {ra}, -8
3030

31-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
31+
# CHECK-ERROR: :[[@LINE+1]]:25: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
3232
qc.cm.pushfp {ra, s0}, -12
3333

34-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [16, 64]
34+
# CHECK-ERROR: :[[@LINE+1]]:25: error: stack adjustment for register list must be a multiple of 16 bytes in the range [16, 64]
3535
qc.cm.pop {ra, s0-s1}, -40
3636

37-
# CHECK-ERROR: error: register list must include 's0' or 'x8'
37+
# CHECK-ERROR: :[[@LINE+1]]:17: error: register list must include 's0' or 'x8'
3838
qc.cm.pushfp {ra}, -16
3939

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
# RUN: not llvm-mc -triple=riscv32 -mattr=zcmp -M no-aliases -show-encoding < %s 2>&1 \
22
# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s
33

4-
# CHECK-ERROR: error: invalid operand for instruction
4+
# CHECK-ERROR: :[[@LINE+1]]:11: error: invalid operand for instruction
55
cm.mvsa01 a1, a2
66

7-
# CHECK-ERROR: error: rs1 and rs2 must be different
7+
# CHECK-ERROR: :[[@LINE+1]]:11: error: rs1 and rs2 must be different
88
cm.mvsa01 s0, s0
99

10-
# CHECK-ERROR: error: invalid operand for instruction
10+
# CHECK-ERROR: :[[@LINE+1]]:11: error: invalid operand for instruction
1111
cm.mva01s a1, a2
1212

13-
# CHECK-ERROR: error: invalid register list, {ra, s0-s10} or {x1, x8-x9, x18-x26} is not supported
13+
# CHECK-ERROR: :[[@LINE+1]]:23: error: invalid register list, {ra, s0-s10} or {x1, x8-x9, x18-x26} is not supported
1414
cm.popretz {ra, s0-s10}, 112
1515

16-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [16, 64]
16+
# CHECK-ERROR: :[[@LINE+1]]:25: error: stack adjustment for register list must be a multiple of 16 bytes in the range [16, 64]
1717
cm.popretz {ra, s0-s1}, 112
1818

19-
# CHECK-ERROR: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
19+
# CHECK-ERROR: :[[@LINE+1]]:15: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
2020
cm.push {ra}, 16
2121

22-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [16, 64]
22+
# CHECK-ERROR: :[[@LINE+1]]:22: error: stack adjustment for register list must be a multiple of 16 bytes in the range [16, 64]
2323
cm.pop {ra, s0-s1}, -32
2424

25-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
25+
# CHECK-ERROR: :[[@LINE+1]]:16: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
2626
cm.push {ra}, -8
2727

2828
# CHECK-ERROR: :[[@LINE+1]]:9: error: register list must start from 'ra' or 'x1'
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
# RUN: not llvm-mc -triple=riscv64 -mattr=experimental-xqccmp -M no-aliases -show-encoding < %s 2>&1 \
22
# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s
33

4-
# CHECK-ERROR: error: invalid operand for instruction
4+
# CHECK-ERROR: :[[@LINE+1]]:14: error: invalid operand for instruction
55
qc.cm.mvsa01 a1, a2
66

7-
# CHECK-ERROR: error: rs1 and rs2 must be different
7+
# CHECK-ERROR: :[[@LINE+1]]:14: error: rs1 and rs2 must be different
88
qc.cm.mvsa01 s0, s0
99

10-
# CHECK-ERROR: error: invalid operand for instruction
10+
# CHECK-ERROR: :[[@LINE+1]]:14: error: invalid operand for instruction
1111
qc.cm.mva01s a1, a2
1212

13-
# CHECK-ERROR: error: invalid register list, {ra, s0-s10} or {x1, x8-x9, x18-x26} is not supported
13+
# CHECK-ERROR: :[[@LINE+1]]:26: error: invalid register list, {ra, s0-s10} or {x1, x8-x9, x18-x26} is not supported
1414
qc.cm.popretz {ra, s0-s10}, 112
1515

16-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [32, 80]
16+
# CHECK-ERROR: :[[@LINE+1]]:28: error: stack adjustment for register list must be a multiple of 16 bytes in the range [32, 80]
1717
qc.cm.popretz {ra, s0-s1}, 112
1818

19-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
19+
# CHECK-ERROR: :[[@LINE+1]]:18: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
2020
qc.cm.push {ra}, 16
2121

22-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
22+
# CHECK-ERROR: :[[@LINE+1]]:24: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
2323
qc.cm.pushfp {ra, s0}, 16
2424

25-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [32, 80]
25+
# CHECK-ERROR: :[[@LINE+1]]:25: error: stack adjustment for register list must be a multiple of 16 bytes in the range [32, 80]
2626
qc.cm.pop {ra, s0-s1}, -32
2727

28-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
28+
# CHECK-ERROR: :[[@LINE+1]]:19: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
2929
qc.cm.push {ra}, -15
3030

31-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
31+
# CHECK-ERROR: :[[@LINE+1]]:23: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
3232
qc.cm.push {ra, s0}, -15
3333

34-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [32, 80]
34+
# CHECK-ERROR: :[[@LINE+1]]:25: error: stack adjustment for register list must be a multiple of 16 bytes in the range [32, 80]
3535
qc.cm.pop {ra, s0-s1}, -33

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
# RUN: not llvm-mc -triple=riscv64 -mattr=zcmp -M no-aliases -show-encoding < %s 2>&1 \
22
# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s
33

4-
# CHECK-ERROR: error: invalid operand for instruction
4+
# CHECK-ERROR: :[[@LINE+1]]:11: error: invalid operand for instruction
55
cm.mvsa01 a1, a2
66

7-
# CHECK-ERROR: error: rs1 and rs2 must be different
7+
# CHECK-ERROR: :[[@LINE+1]]:11: error: rs1 and rs2 must be different
88
cm.mvsa01 s0, s0
99

10-
# CHECK-ERROR: error: invalid operand for instruction
10+
# CHECK-ERROR: :[[@LINE+1]]:11: error: invalid operand for instruction
1111
cm.mva01s a1, a2
1212

13-
# CHECK-ERROR: error: invalid register list, {ra, s0-s10} or {x1, x8-x9, x18-x26} is not supported
13+
# CHECK-ERROR: :[[@LINE+1]]:23: error: invalid register list, {ra, s0-s10} or {x1, x8-x9, x18-x26} is not supported
1414
cm.popretz {ra, s0-s10}, 112
1515

16-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [32, 80]
16+
# CHECK-ERROR: :[[@LINE+1]]:25: error: stack adjustment for register list must be a multiple of 16 bytes in the range [32, 80]
1717
cm.popretz {ra, s0-s1}, 112
1818

19-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
19+
# CHECK-ERROR: :[[@LINE+1]]:15: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
2020
cm.push {ra}, 16
2121

22-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [32, 80]
22+
# CHECK-ERROR: :[[@LINE+1]]:22: error: stack adjustment for register list must be a multiple of 16 bytes in the range [32, 80]
2323
cm.pop {ra, s0-s1}, -32
2424

25-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
25+
# CHECK-ERROR: :[[@LINE+1]]:16: error: stack adjustment for register list must be a multiple of 16 bytes in the range [-64, -16]
2626
cm.push {ra}, -15
2727

28-
# CHECK-ERROR: error: stack adjustment for register list must be a multiple of 16 bytes in the range [32, 80]
28+
# CHECK-ERROR: :[[@LINE+1]]:22: error: stack adjustment for register list must be a multiple of 16 bytes in the range [32, 80]
2929
cm.pop {ra, s0-s1}, -33
3030

3131
# CHECK-ERROR: :[[@LINE+1]]:9: error: register list must start from 'ra' or 'x1'

0 commit comments

Comments
 (0)