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-07-22 17:24:56 +0800
commit5f511cf22a59fde23e462129e72a10a6e160944a (patch)
treea59a4e03b7831cd2109c239dca75fcd69551220f
parent5e1f22d21a9b0d7e23e2e5aef5d418f10c39941b (diff)
downloadgdb-users/riscv/binutils-integration-2.37.zip
gdb-users/riscv/binutils-integration-2.37.tar.gz
gdb-users/riscv/binutils-integration-2.37.tar.bz2
RISC-V/zfh: Added big endian testcase for .float16 directive.users/riscv/binutils-integration-2.37
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