[committed, integration] RISC-V/zfh: Added big endian testcase for .float16 directive.

Nelson Chu nelson.chu@sifive.com
Mon May 10 05:54:09 GMT 2021


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.
---
 gas/testsuite/gas/riscv/extended/extended.exp |  3 ++-
 gas/testsuite/gas/riscv/extended/float16-be.d | 10 ++++++++++
 gas/testsuite/gas/riscv/extended/float16-le.d | 10 ++++++++++
 gas/testsuite/gas/riscv/extended/float16.d    | 10 ----------
 gas/testsuite/gas/riscv/extended/float16.s    |  2 +-
 5 files changed, 23 insertions(+), 12 deletions(-)
 create mode 100644 gas/testsuite/gas/riscv/extended/float16-be.d
 create mode 100644 gas/testsuite/gas/riscv/extended/float16-le.d
 delete mode 100644 gas/testsuite/gas/riscv/extended/float16.d

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-le.d b/gas/testsuite/gas/riscv/extended/float16-le.d
new file mode 100644
index 0000000..5591148
--- /dev/null
+++ b/gas/testsuite/gas/riscv/extended/float16-le.d
@@ -0,0 +1,10 @@
+# source: float16.s
+# objdump: -sj .data
+# as: -mlittle-endian
+
+.*:[ 	]+file format .*littleriscv
+
+Contents of section \.data:
+ 0000 004adf2f 191cff7b 0100ff03 0004003c.*
+ 0010 013cff7f 007c00fc 00000080 00bce7bb.*
+ 0020 fffb0042 004a3e60 007e017c.*
diff --git a/gas/testsuite/gas/riscv/extended/float16.d b/gas/testsuite/gas/riscv/extended/float16.d
deleted file mode 100644
index e75971d..0000000
--- a/gas/testsuite/gas/riscv/extended/float16.d
+++ /dev/null
@@ -1,10 +0,0 @@
-# source: float16.s
-# objdump: -sj .data
-# as:
-
-.*:[ 	]+file format .*
-
-Contents of section \.data:
- 0000 004adf2f 191cff7b 0100ff03 0004003c.*
- 0010 013cff7f 007c00fc 00000080 00bce7bb.*
- 0020 fffb0042 004a3e60 007e017e.*
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
-- 
2.7.4



More information about the Binutils mailing list