diff options
author | claziss <claziss@synopsys.com> | 2017-11-03 15:36:42 +0100 |
---|---|---|
committer | claziss <claziss@synopsys.com> | 2017-11-03 15:36:54 +0100 |
commit | fdddd2900f39584e7d6cee27127593fba2cb0cf2 (patch) | |
tree | e275e77f8026e669737a770701265b922620ec97 /binutils/testsuite/binutils-all | |
parent | 7605d944531519ddf9026bf059475a4347c83aa4 (diff) | |
download | gdb-fdddd2900f39584e7d6cee27127593fba2cb0cf2.zip gdb-fdddd2900f39584e7d6cee27127593fba2cb0cf2.tar.gz gdb-fdddd2900f39584e7d6cee27127593fba2cb0cf2.tar.bz2 |
[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.
Diffstat (limited to 'binutils/testsuite/binutils-all')
-rw-r--r-- | binutils/testsuite/binutils-all/arc/hexprint.s | 2 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/arc/objdump.exp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/binutils/testsuite/binutils-all/arc/hexprint.s b/binutils/testsuite/binutils-all/arc/hexprint.s new file mode 100644 index 0000000..bdc61b0 --- /dev/null +++ b/binutils/testsuite/binutils-all/arc/hexprint.s @@ -0,0 +1,2 @@ + .cpu EM + st r0,[r1,-9] diff --git a/binutils/testsuite/binutils-all/arc/objdump.exp b/binutils/testsuite/binutils-all/arc/objdump.exp index 2037b2b..669d57a 100644 --- a/binutils/testsuite/binutils-all/arc/objdump.exp +++ b/binutils/testsuite/binutils-all/arc/objdump.exp @@ -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\]} |