-# 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
global OBJDUMP
global OBJDUMPFLAGS
+ if [string equal "" $objfile] then {
+ fail $testname
+ return
+ }
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS --disassemble $disas_flags \
$objfile"]
# 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]
$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 \
# Make sure that the last cpu= value is used.
check_assembly "arc double_store -Mcpu=hs,cpu=em" $objfile \
$double_store_em_expected "-Mcpu=hs,cpu=em"
-
+# Check the hex printing for short immediates.
+set thexobj [do_objfile hexprint.s]
+check_assembly "arc hex printing" $thexobj \
+ {st\s*r0,\[r1,0xfffffff7\]} "-Mhex"
+check_assembly "arc normal printing" $thexobj \
+ {st\s*r0,\[r1,-9\]}