aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNelson Chu <nelson.chu@sifive.com>2021-05-10 13:38:23 +0800
committerNelson Chu <nelson.chu@sifive.com>2021-10-28 08:50:29 +0800
commitffbe01609fbe8adac780396d1c59b70227236918 (patch)
treef38dda7399bdbc0b60421442af3e47fa7e75e349
parent41675fa0dfbb7cc7f1503bc3946bab085b8e5072 (diff)
downloadgdb-ffbe01609fbe8adac780396d1c59b70227236918.zip
gdb-ffbe01609fbe8adac780396d1c59b70227236918.tar.gz
gdb-ffbe01609fbe8adac780396d1c59b70227236918.tar.bz2
RISC-V/zfh: Added big endian testcase for .float16 directive.
gas/ * testsuite/gas/riscv/extended/extended.exp: Updated. * testsuite/gas/riscv/extended/float16.s: Minor fix for sNaNh. * testsuite/gas/riscv/extended/float16-le.d: Updated and renamed from float16.d. * testsuite/gas/riscv/extended/float16-be.d: New testcase.
-rw-r--r--gas/testsuite/gas/riscv/extended/extended.exp3
-rw-r--r--gas/testsuite/gas/riscv/extended/float16-be.d10
-rw-r--r--gas/testsuite/gas/riscv/extended/float16-le.d (renamed from gas/testsuite/gas/riscv/extended/float16.d)6
-rw-r--r--gas/testsuite/gas/riscv/extended/float16.s2
4 files changed, 16 insertions, 5 deletions
diff --git a/gas/testsuite/gas/riscv/extended/extended.exp b/gas/testsuite/gas/riscv/extended/extended.exp
index 2b36cc5..78ea074 100644
--- a/gas/testsuite/gas/riscv/extended/extended.exp
+++ b/gas/testsuite/gas/riscv/extended/extended.exp
@@ -32,7 +32,8 @@ if [istarget riscv*-*-*] {
run_dump_tests "vector-insns-fail-permutation"
run_dump_tests "vector-insns-fail-zvamo"
run_dump_tests "fp-zfh-insns"
- run_dump_tests "float16"
+ run_dump_tests "float16-le"
+ run_dump_tests "float16-be"
run_dump_tests "extended-csr"
}
diff --git a/gas/testsuite/gas/riscv/extended/float16-be.d b/gas/testsuite/gas/riscv/extended/float16-be.d
new file mode 100644
index 0000000..daec7b1
--- /dev/null
+++ b/gas/testsuite/gas/riscv/extended/float16-be.d
@@ -0,0 +1,10 @@
+# source: float16.s
+# objdump: -sj .data
+# as: -mbig-endian
+
+.*:[ ]+file format .*bigriscv
+
+Contents of section \.data:
+ 0000 4a002fdf 1c197bff 000103ff 04003c00.*
+ 0010 3c017fff 7c00fc00 00008000 bc00bbe7.*
+ 0020 fbff4200 4a00603e 7e007c01.*
diff --git a/gas/testsuite/gas/riscv/extended/float16.d b/gas/testsuite/gas/riscv/extended/float16-le.d
index e75971d..5591148 100644
--- a/gas/testsuite/gas/riscv/extended/float16.d
+++ b/gas/testsuite/gas/riscv/extended/float16-le.d
@@ -1,10 +1,10 @@
# source: float16.s
# objdump: -sj .data
-# as:
+# as: -mlittle-endian
-.*:[ ]+file format .*
+.*:[ ]+file format .*littleriscv
Contents of section \.data:
0000 004adf2f 191cff7b 0100ff03 0004003c.*
0010 013cff7f 007c00fc 00000080 00bce7bb.*
- 0020 fffb0042 004a3e60 007e017e.*
+ 0020 fffb0042 004a3e60 007e017c.*
diff --git a/gas/testsuite/gas/riscv/extended/float16.s b/gas/testsuite/gas/riscv/extended/float16.s
index 709ea0a..c206385 100644
--- a/gas/testsuite/gas/riscv/extended/float16.s
+++ b/gas/testsuite/gas/riscv/extended/float16.s
@@ -18,4 +18,4 @@
.float16 -65504
.float16 3.0, 12.0, 543.123
.float16 0h:7e00 # qNaNh
- .float16 0h:7e01 # sNaNh
+ .float16 0h:7c01 # sNaNh