[ARC] Force the disassam to use the hexadecimal number for printing

Force printing of the short/signed values using hexadecimal
representation via disassembler option.

opcode/
2017-11-03  Claudiu Zissulescu  <claziss@synopsys.com>

        * arc-dis.c (print_hex): New variable.
        (parse_option): Check for hex option.
        (print_insn_arc): Use hexadecimal representation for short
        immediate values when requested.
        (print_arc_disassembler_options): Add hex option to the list.

binutils/
2017-11-03  Claudiu Zissulescu  <claziss@synopsys.com>

        * doc/binutils.texi (ARC): Update disassembler options.
        * testsuite/binutils-all/arc/hexprint.s: New file.
        * testsuite/binutils-all/arc/objdump.exp: Test hex printing feature.
This commit is contained in:
claziss
2017-11-03 15:36:42 +01:00
parent 7605d94453
commit fdddd2900f
6 changed files with 40 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
.cpu EM
st r0,[r1,-9]

View File

@@ -91,4 +91,9 @@ check_assembly "arc double_store -Mcpu=em,fpus" $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\]}