]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
RISC-V/zfh: Added big endian testcase for .float16 directive. users/riscv/binutils-integration-2.37
authorNelson Chu <nelson.chu@sifive.com>
Mon, 10 May 2021 05:38:23 +0000 (13:38 +0800)
committerNelson Chu <nelson.chu@sifive.com>
Thu, 22 Jul 2021 09:24:56 +0000 (17:24 +0800)
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
gas/testsuite/gas/riscv/extended/float16-be.d [new file with mode: 0644]
gas/testsuite/gas/riscv/extended/float16-le.d [moved from gas/testsuite/gas/riscv/extended/float16.d with 63% similarity]
gas/testsuite/gas/riscv/extended/float16.s

index 2b36cc548cc3fcc5a155203128b98e52cb94e172..78ea0743e22a10409b2c4ea4871ed2932136951b 100644 (file)
@@ -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 (file)
index 0000000..daec7b1
--- /dev/null
@@ -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.*
similarity index 63%
rename from gas/testsuite/gas/riscv/extended/float16.d
rename to gas/testsuite/gas/riscv/extended/float16-le.d
index e75971d941783bb9972dc2cadba51cdb6180cff4..5591148c2c85841008540d3cabf8752c8a00f2be 100644 (file)
@@ -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.*
index 709ea0af7ca087609211724ddb5944286714a34e..c206385d22112061a6d27550243777ee5aa75361 100644 (file)
@@ -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