diff options
author | jiawei <jiawei@iscas.ac.cn> | 2021-11-17 20:10:08 +0800 |
---|---|---|
committer | Nelson Chu <nelson.chu@sifive.com> | 2021-11-18 14:43:33 +0800 |
commit | 273a32ac6564647cadfb15600385a003ef7486aa (patch) | |
tree | 123f07e17d94a98927008871fe4d7d05066a2a42 /gas | |
parent | de83e5142d054218f476f7364f795bcaa30efd3f (diff) | |
download | fsf-binutils-gdb-273a32ac6564647cadfb15600385a003ef7486aa.zip fsf-binutils-gdb-273a32ac6564647cadfb15600385a003ef7486aa.tar.gz fsf-binutils-gdb-273a32ac6564647cadfb15600385a003ef7486aa.tar.bz2 |
RISC-V: Add testcases for z[fdq]inx
Use gpr when the zfinx enable, the testcases contain float
instructions that reuse by z[fdq]inx.
gas/ChangeLog:
* testsuite/gas/riscv/zdinx.d: New test.
* testsuite/gas/riscv/zdinx.s: New test.
* testsuite/gas/riscv/zfinx.d: New test.
* testsuite/gas/riscv/zfinx.s: New test.
* testsuite/gas/riscv/zqinx.d: New test.
* testsuite/gas/riscv/zqinx.s: New test.
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/gas/riscv/zdinx.d | 41 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zdinx.s | 33 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zfinx.d | 39 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zfinx.s | 31 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zqinx.d | 43 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zqinx.s | 35 |
6 files changed, 222 insertions, 0 deletions
diff --git a/gas/testsuite/gas/riscv/zdinx.d b/gas/testsuite/gas/riscv/zdinx.d new file mode 100644 index 0000000..3e4c1a7 --- /dev/null +++ b/gas/testsuite/gas/riscv/zdinx.d @@ -0,0 +1,41 @@ +#as: -march=rv64ima_zdinx +#source: zdinx.s +#objdump: -dr + +.*:[ ]+file format .* + +Disass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[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+d235f553[ ]+fcvt.d.lu[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+22c58553[ ]+fsgnj.d[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+22c59553[ ]+fsgnjn.d[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+22c5a553[ ]+fsgnjx.d[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+a2c5a553[ ]+feq.d[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+a2c59553[ ]+flt.d[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+a2c58553[ ]+fle.d[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+a2b61553[ ]+flt.d[ ]+a0,a2,a1 +[ ]+[0-9a-f]+:[ ]+a2b60553[ ]+fle.d[ ]+a0,a2,a1 +[ ]+[0-9a-f]+:[ ]+22a51553[ ]+fneg.d[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+22a52553[ ]+fabs.d[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+e2059553[ ]+fclass.d[ ]+a0,a1 diff --git a/gas/testsuite/gas/riscv/zdinx.s b/gas/testsuite/gas/riscv/zdinx.s new file mode 100644 index 0000000..c427d98 --- /dev/null +++ b/gas/testsuite/gas/riscv/zdinx.s @@ -0,0 +1,33 @@ +target: + fadd.d a0, a1, a2 + fsub.d a0, a1, a2 + fmul.d a0, a1, a2 + fdiv.d a0, a1, a2 + fsqrt.d a0, a0 + fmin.d a0, a1, a2 + fmax.d a0, a1, a2 + fmadd.d a0, a1, a2, a3 + fnmadd.d a0, a1, a2, a3 + fmsub.d a0, a1, a2, a3 + fnmsub.d a0, a1, a2, a3 + fcvt.w.d a0, a1 + fcvt.wu.d a0, a1 + fcvt.l.d a0, a1 + fcvt.lu.d a0, a1 + fcvt.s.d a0, a1 + fcvt.d.s a0, a1 + fcvt.d.w a0, a1 + fcvt.d.wu a0, a1 + fcvt.d.l a0, a1 + fcvt.d.lu a0, a1 + fsgnj.d a0, a1, a2 + fsgnjn.d a0, a1, a2 + fsgnjx.d a0, a1, a2 + feq.d a0, a1, a2 + flt.d a0, a1, a2 + fle.d a0, a1, a2 + fgt.d a0, a1, a2 + fge.d a0, a1, a2 + fneg.d a0, a0 + fabs.d a0, a0 + fclass.d a0, a1 diff --git a/gas/testsuite/gas/riscv/zfinx.d b/gas/testsuite/gas/riscv/zfinx.d new file mode 100644 index 0000000..d5499aa --- /dev/null +++ b/gas/testsuite/gas/riscv/zfinx.d @@ -0,0 +1,39 @@ +#as: -march=rv64ima_zfinx +#source: zfinx.s +#objdump: -dr + +.*:[ ]+file format .* + +Disassembly of section .text: + +0+000 <target>: +[ ]+[0-9a-f]+:[ ]+00c5f553[ ]+fadd.s[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+08c5f553[ ]+fsub.s[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+10c5f553[ ]+fmul.s[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+18c5f553[ ]+fdiv.s[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+58057553[ ]+fsqrt.s[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+28c58553[ ]+fmin.s[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+28c59553[ ]+fmax.s[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+68c5f543[ ]+fmadd.s[ ]+a0,a1,a2,a3 +[ ]+[0-9a-f]+:[ ]+68c5f54f[ ]+fnmadd.s[ ]+a0,a1,a2,a3 +[ ]+[0-9a-f]+:[ ]+68c5f547[ ]+fmsub.s[ ]+a0,a1,a2,a3 +[ ]+[0-9a-f]+:[ ]+68c5f54b[ ]+fnmsub.s[ ]+a0,a1,a2,a3 +[ ]+[0-9a-f]+:[ ]+c005f553[ ]+fcvt.w.s[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+c015f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, a2 + fdiv.s a0, a1, a2 + fsqrt.s a0, a0 + fmin.s a0, a1, a2 + fmax.s a0, a1, a2 + fmadd.s a0, a1, a2, a3 + fnmadd.s a0, a1, a2, a3 + fmsub.s a0, a1, a2, a3 + fnmsub.s a0, a1, a2, a3 + fcvt.w.s a0, a1 + fcvt.wu.s a0, a1 + fcvt.l.s a0, a1 + fcvt.lu.s a0, a1 + fcvt.s.w a0, a1 + fcvt.s.wu a0, a1 + fcvt.s.l a0, a1 + fcvt.s.lu a0, a1 + fsgnj.s a0, a1, a2 + fsgnjn.s a0, a1, a2 + fsgnjx.s a0, a1, a2 + feq.s a0, a1, a2 + flt.s a0, a1, a2 + fle.s a0, a1, a2 + fgt.s a0, a1, a2 + fge.s a0, a1, a2 + fneg.s a0, a0 + fabs.s a0, a0 + fclass.s a0, a1 diff --git a/gas/testsuite/gas/riscv/zqinx.d b/gas/testsuite/gas/riscv/zqinx.d new file mode 100644 index 0000000..5c2202d --- /dev/null +++ b/gas/testsuite/gas/riscv/zqinx.d @@ -0,0 +1,43 @@ +#as: -march=rv64ima_zqinx +#source: zqinx.s +#objdump: -dr + +.*:[ ]+file format .* + +Disassembly of section .text: + +0+000 <target>: +[ ]+[0-9a-f]+:[ ]+06c5f553[ ]+fadd.q[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+0ec5f553[ ]+fsub.q[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+16c5f553[ ]+fmul.q[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+1ec5f553[ ]+fdiv.q[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+5e057553[ ]+fsqrt.q[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+2ec58553[ ]+fmin.q[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+2ec59553[ ]+fmax.q[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+6ec5f543[ ]+fmadd.q[ ]+a0,a1,a2,a3 +[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f]+:[ ]+a6c58553[ ]+fle.q[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+a6b61553[ ]+flt.q[ ]+a0,a2,a1 +[ ]+[0-9a-f]+:[ ]+a6b60553[ ]+fle.q[ ]+a0,a2,a1 +[ ]+[0-9a-f]+:[ ]+26a51553[ ]+fneg.q[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+26a52553[ ]+fabs.q[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+e6059553[ ]+fclass.q[ ]+a0,a1 diff --git a/gas/testsuite/gas/riscv/zqinx.s b/gas/testsuite/gas/riscv/zqinx.s new file mode 100644 index 0000000..ba5179d --- /dev/null +++ b/gas/testsuite/gas/riscv/zqinx.s @@ -0,0 +1,35 @@ +target: + fadd.q a0, a1, a2 + fsub.q a0, a1, a2 + fmul.q a0, a1, a2 + fdiv.q a0, a1, a2 + fsqrt.q a0, a0 + fmin.q a0, a1, a2 + fmax.q a0, a1, a2 + fmadd.q a0, a1, a2, a3 + fnmadd.q a0, a1, a2, a3 + fmsub.q a0, a1, a2, a3 + fnmsub.q a0, a1, a2, a3 + fcvt.w.q a0, a1 + fcvt.wu.q a0, a1 + fcvt.l.q a0, a1 + fcvt.lu.q a0, a1 + fcvt.s.q a0, a1 + fcvt.d.q a0, a1 + fcvt.q.s a0, a1 + fcvt.q.d a0, a1 + fcvt.q.w a0, a1 + fcvt.q.wu a0, a1 + fcvt.q.l a0, a1 + fcvt.q.lu a0, a1 + fsgnj.q a0, a1, a2 + fsgnjn.q a0, a1, a2 + fsgnjx.q a0, a1, a2 + feq.q a0, a1, a2 + flt.q a0, a1, a2 + fle.q a0, a1, a2 + fgt.q a0, a1, a2 + fge.q a0, a1, a2 + fneg.q a0, a0 + fabs.q a0, a0 + fclass.q a0, a1 |