diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/NEWS | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/march-help.l | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zacas-32.d | 26 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zacas-64.d | 34 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zacas-fail-32.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zacas-fail-32.l | 17 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zacas-fail-64.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zacas-fail-64.l | 9 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zacas-fail.s | 17 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zacas.s | 27 |
10 files changed, 139 insertions, 0 deletions
@@ -19,6 +19,8 @@ * Remove support for RISC-V privileged spec 1.9.1, but linker can still recognize it in case of linking old objects. +* Add support for RISC-V Zacas extension with version 1.0. + * Add support for RISC-V Zcmp extension with version 1.0. * Add support for RISC-V Zfbfmin extension with version 1.0. diff --git a/gas/testsuite/gas/riscv/march-help.l b/gas/testsuite/gas/riscv/march-help.l index d2b9838..e0d597e 100644 --- a/gas/testsuite/gas/riscv/march-help.l +++ b/gas/testsuite/gas/riscv/march-help.l @@ -23,6 +23,7 @@ All available -march extensions for RISC-V: zmmul 1.0 zaamo 1.0 zabha 1.0 + zacas 1.0 zalrsc 1.0 zawrs 1.0 zfbfmin 1.0 diff --git a/gas/testsuite/gas/riscv/zacas-32.d b/gas/testsuite/gas/riscv/zacas-32.d new file mode 100644 index 0000000..9f7fabb --- /dev/null +++ b/gas/testsuite/gas/riscv/zacas-32.d @@ -0,0 +1,26 @@ +#as: -march=rv32ia_zacas +#source: zacas.s +#objdump: -d + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 <target>: +[ ]+[0-9a-f]+:[ ]+28a5252f[ ]+amocas.w[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+28a5252f[ ]+amocas.w[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2ca5252f[ ]+amocas.w.aq[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2ca5252f[ ]+amocas.w.aq[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2aa5252f[ ]+amocas.w.rl[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2aa5252f[ ]+amocas.w.rl[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2ea5252f[ ]+amocas.w.aqrl[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2ea5252f[ ]+amocas.w.aqrl[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+28a5352f[ ]+amocas.d[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+28a5352f[ ]+amocas.d[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2ca5352f[ ]+amocas.d.aq[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2ca5352f[ ]+amocas.d.aq[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2aa5352f[ ]+amocas.d.rl[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2aa5352f[ ]+amocas.d.rl[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2ea5352f[ ]+amocas.d.aqrl[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2ea5352f[ ]+amocas.d.aqrl[ ]+a0,a0,\(a0\) diff --git a/gas/testsuite/gas/riscv/zacas-64.d b/gas/testsuite/gas/riscv/zacas-64.d new file mode 100644 index 0000000..3f9113b --- /dev/null +++ b/gas/testsuite/gas/riscv/zacas-64.d @@ -0,0 +1,34 @@ +#as: -march=rv64ia_zacas -defsym rv64=1 +#source: zacas.s +#objdump: -d + +.*:[ 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]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2ca5452f[ ]+amocas.q.aq[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2ca5452f[ ]+amocas.q.aq[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2aa5452f[ ]+amocas.q.rl[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2aa5452f[ ]+amocas.q.rl[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2ea5452f[ ]+amocas.q.aqrl[ ]+a0,a0,\(a0\) +[ ]+[0-9a-f]+:[ ]+2ea5452f[ ]+amocas.q.aqrl[ ]+a0,a0,\(a0\) diff --git a/gas/testsuite/gas/riscv/zacas-fail-32.d b/gas/testsuite/gas/riscv/zacas-fail-32.d new file mode 100644 index 0000000..f9cee1c --- /dev/null +++ b/gas/testsuite/gas/riscv/zacas-fail-32.d @@ -0,0 +1,3 @@ +#as: -march=rv32ia_zacas +#source: zacas-fail.s +#error_output: zacas-fail-32.l
\ No newline at end of file diff --git a/gas/testsuite/gas/riscv/zacas-fail-32.l b/gas/testsuite/gas/riscv/zacas-fail-32.l new file mode 100644 index 0000000..ff12bd3 --- /dev/null +++ b/gas/testsuite/gas/riscv/zacas-fail-32.l @@ -0,0 +1,17 @@ +.*: Assembler messages: +.*: Error: illegal operands `amocas.d a1,a0,\(a0\)' +.*: Error: illegal operands `amocas.d a0,a1,\(a0\)' +.*: Error: illegal operands `amocas.d.aq a1,a0,\(a0\)' +.*: Error: illegal operands `amocas.d.aq a0,a1,\(a0\)' +.*: Error: illegal operands `amocas.d.rl a1,a0,\(a0\)' +.*: Error: illegal operands `amocas.d.rl a0,a1,\(a0\)' +.*: Error: illegal operands `amocas.d.aqrl a1,a0,\(a0\)' +.*: Error: illegal operands `amocas.d.aqrl a0,a1,\(a0\)' +.*: Error: unrecognized opcode `amocas.q a1,a0,\(a0\)' +.*: Error: unrecognized opcode `amocas.q a0,a1,\(a0\)' +.*: Error: unrecognized opcode `amocas.q.aq a1,a0,\(a0\)' +.*: Error: unrecognized opcode `amocas.q.aq a0,a1,\(a0\)' +.*: Error: unrecognized opcode `amocas.q.rl a1,a0,\(a0\)' +.*: Error: unrecognized opcode `amocas.q.rl a0,a1,\(a0\)' +.*: Error: unrecognized opcode `amocas.q.aqrl a1,a0,\(a0\)' +.*: Error: unrecognized opcode `amocas.q.aqrl a0,a1,\(a0\)' diff --git a/gas/testsuite/gas/riscv/zacas-fail-64.d b/gas/testsuite/gas/riscv/zacas-fail-64.d new file mode 100644 index 0000000..d8413e0 --- /dev/null +++ b/gas/testsuite/gas/riscv/zacas-fail-64.d @@ -0,0 +1,3 @@ +#as: -march=rv64ia_zacas +#source: zacas-fail.s +#error_output: zacas-fail-64.l
\ No newline at end of file diff --git a/gas/testsuite/gas/riscv/zacas-fail-64.l b/gas/testsuite/gas/riscv/zacas-fail-64.l new file mode 100644 index 0000000..9ac263d --- /dev/null +++ b/gas/testsuite/gas/riscv/zacas-fail-64.l @@ -0,0 +1,9 @@ +.*: Assembler messages: +.*: Error: illegal operands `amocas.q a1,a0,\(a0\)' +.*: Error: illegal operands `amocas.q a0,a1,\(a0\)' +.*: Error: illegal operands `amocas.q.aq a1,a0,\(a0\)' +.*: Error: illegal operands `amocas.q.aq a0,a1,\(a0\)' +.*: Error: illegal operands `amocas.q.rl a1,a0,\(a0\)' +.*: Error: illegal operands `amocas.q.rl a0,a1,\(a0\)' +.*: Error: illegal operands `amocas.q.aqrl a1,a0,\(a0\)' +.*: Error: illegal operands `amocas.q.aqrl a0,a1,\(a0\)' diff --git a/gas/testsuite/gas/riscv/zacas-fail.s b/gas/testsuite/gas/riscv/zacas-fail.s new file mode 100644 index 0000000..b1b4ddf --- /dev/null +++ b/gas/testsuite/gas/riscv/zacas-fail.s @@ -0,0 +1,17 @@ + # rd and rs2 must be even + amocas.d a1, a0, (a0) + amocas.d a0, a1, (a0) + amocas.d.aq a1, a0, (a0) + amocas.d.aq a0, a1, (a0) + amocas.d.rl a1, a0, (a0) + amocas.d.rl a0, a1, (a0) + amocas.d.aqrl a1, a0, (a0) + amocas.d.aqrl a0, a1, (a0) + amocas.q a1, a0, (a0) + amocas.q a0, a1, (a0) + amocas.q.aq a1, a0, (a0) + amocas.q.aq a0, a1, (a0) + amocas.q.rl a1, a0, (a0) + amocas.q.rl a0, a1, (a0) + amocas.q.aqrl a1, a0, (a0) + amocas.q.aqrl a0, a1, (a0) diff --git a/gas/testsuite/gas/riscv/zacas.s b/gas/testsuite/gas/riscv/zacas.s new file mode 100644 index 0000000..c374ba1 --- /dev/null +++ b/gas/testsuite/gas/riscv/zacas.s @@ -0,0 +1,27 @@ +target: + amocas.w a0, a0, 0(a0) + amocas.w a0, a0, (a0) + amocas.w.aq a0, a0, 0(a0) + amocas.w.aq a0, a0, (a0) + amocas.w.rl a0, a0, 0(a0) + amocas.w.rl a0, a0, (a0) + amocas.w.aqrl a0, a0, 0(a0) + amocas.w.aqrl a0, a0, (a0) + amocas.d a0, a0, 0(a0) + amocas.d a0, a0, (a0) + amocas.d.aq a0, a0, 0(a0) + amocas.d.aq a0, a0, (a0) + amocas.d.rl a0, a0, 0(a0) + amocas.d.rl a0, a0, (a0) + amocas.d.aqrl a0, a0, 0(a0) + amocas.d.aqrl a0, a0, (a0) +.ifdef rv64 + amocas.q a0, a0, 0(a0) + amocas.q a0, a0, (a0) + amocas.q.aq a0, a0, 0(a0) + amocas.q.aq a0, a0, (a0) + amocas.q.rl a0, a0, 0(a0) + amocas.q.rl a0, a0, (a0) + amocas.q.aqrl a0, a0, 0(a0) + amocas.q.aqrl a0, a0, (a0) +.endif |