arc: Detect usage of illegal double register pairs
[deliverable/binutils-gdb.git] / binutils / testsuite / binutils-all / arc / objdump.exp
index 669d57ace75680c3bcfa90feff00daced7980b6c..542a33676977a831878c935249ab689d2a6aec10 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+#   Copyright (C) 2016-2020 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,6 +52,10 @@ proc check_assembly { testname objfile expected { disas_flags "" } } {
     global OBJDUMP
     global OBJDUMPFLAGS
 
+    if [string equal "" $objfile] then {
+       fail $testname
+       return
+    }
     set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS --disassemble $disas_flags \
        $objfile"]
 
@@ -68,6 +72,9 @@ proc check_assembly { testname objfile expected { disas_flags "" } } {
 # disassembler has had to guess as the instruction class in use).
 set want "Warning: disassembly.*vmac2hnfr\[ \t\]*r0,r2,r4.*dmulh12.f\[ \t\]*r0,r2,r4.*dmulh11.f"
 check_assembly "Warning test" [do_objfile dsp.s] $want
+set warn_double_reg "Warning: illegal use of double register pair."
+check_assembly "Warning faulty double regs" [do_objfile double_regs.s] \
+    $warn_double_reg
 
 set double_store_hs_expected {std\s*r0r1,\[r3\]}
 set objfile [do_objfile double_store.s]
@@ -77,7 +84,7 @@ check_assembly "arc double_store -Mcpu=hs" $objfile \
     $double_store_hs_expected "-Mcpu=hs"
 check_assembly "arc double_store -Mcpu=hs38_linux" $objfile \
     $double_store_hs_expected "-Mcpu=hs38_linux"
-set double_store_em_expected ".long 0x1b000006"
+set double_store_em_expected {word\s*0x1b000006}
 check_assembly "arc double_store -Mcpu=em" $objfile \
     $double_store_em_expected "-Mcpu=em"
 check_assembly "arc double_store -Mcpu=em4_dmips" $objfile \
This page took 0.023874 seconds and 4 git commands to generate.