gdb/testsuite: Add support for LoongArch in gdb.base/float.exp
authorHui Li <lihui@loongson.cn>
Sat, 4 Mar 2023 00:45:28 +0000 (08:45 +0800)
committerTiezhu Yang <yangtiezhu@loongson.cn>
Thu, 16 Mar 2023 14:59:34 +0000 (22:59 +0800)
The test results on LoongArch as follows:

Without this patch:

```
$ make check-gdb TESTS="gdb.base/float.exp"
=== gdb Summary ===

 # of expected passes 2
 # of unexpected failures 1

```
With this patch:

```
$ make check-gdb TESTS="gdb.base/float.exp"
=== gdb Summary ===

 # of expected passes 3

```

Signed-off-by: Hui Li <lihui@loongson.cn>
Reviewed-By: Tom Tromey <tom@tromey.com>
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
gdb/testsuite/gdb.base/float.exp

index 7f230cb6f614a1fcfa125244baf54553af2d1189..5e9be538b735588b9c690472ea79a8763ab44404 100644 (file)
@@ -126,6 +126,8 @@ if {[is_aarch64_target]} {
              pass "info float (without FPU)"
        }
     }
+} elseif {[istarget "loongarch*-*-*"]} {
+    gdb_test "info float" "f.*fcc0.*fcsr.*" "info float"
 } else {
     gdb_test "info float" "No floating.point info available for this processor." "info float (unknown target)"
 }