summaryrefslogtreecommitdiff
path: root/opcodes/aarch64-opc.c
diff options
context:
space:
mode:
authorYufeng Zhang <yufeng.zhang@arm.com>2013-01-04 14:59:32 +0000
committerYufeng Zhang <yufeng.zhang@arm.com>2013-01-04 14:59:32 +0000
commit53f25b25024214caed2131972fdb1e15176edbfc (patch)
tree016e741a20e57485200d10a875536ff7bed41480 /opcodes/aarch64-opc.c
parenta9d4faa568d03c3a03bf2dc533612603ce418dda (diff)
downloadbinutils-redhat-53f25b25024214caed2131972fdb1e15176edbfc.tar.gz
opcodes/
2013-01-04 Yufeng Zhang <yufeng.zhang@arm.com> * aarch64-opc.c (aarch64_print_operand): Change to print AARCH64_OPND_IMM_MOV in hexadecimal in the instruction and in decimal in comment. * aarch64-tbl.h (aarch64_opcode_table): Remove the 'F_PSEUDO' flag from the opcode entries of OP_MOV_IMM_LOG, OP_MOV_IMM_WIDEN and OP_MOV_IMM_WIDE. gas/testsuite/ 2013-01-04 Yufeng Zhang <yufeng.zhang@arm.com> * gas/aarch64/int-insns.d: Update. * gas/aarch64/mov.d: Update. * gas/aarch64/reloc-insn.d: Update. ld/testsuite/ 2013-01-04 Yufeng Zhang <yufeng.zhang@arm.com> * ld-aarch64/emit-relocs-264.d: Append the '-Mno-aliases' option to the objdump directive. * ld-aarch64/emit-relocs-266.d: Ditto. * ld-aarch64/emit-relocs-268.d: Ditto. * ld-aarch64/emit-relocs-269.d: Ditto. * ld-aarch64/emit-relocs-270.d: Ditto. * ld-aarch64/emit-relocs-271.d: Ditto. * ld-aarch64/emit-relocs-272.d: Ditto.
Diffstat (limited to 'opcodes/aarch64-opc.c')
-rw-r--r--opcodes/aarch64-opc.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index fdb4cebdb8..72ecf5b61e 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -1,5 +1,5 @@
/* aarch64-opc.c -- AArch64 opcode support.
- Copyright 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
Contributed by ARM Ltd.
This file is part of the GNU opcodes library.
@@ -2433,10 +2433,26 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc,
case AARCH64_OPND_IMMR:
case AARCH64_OPND_IMMS:
case AARCH64_OPND_FBITS:
- case AARCH64_OPND_IMM_MOV:
snprintf (buf, size, "#%" PRIi64, opnd->imm.value);
break;
+ case AARCH64_OPND_IMM_MOV:
+ switch (aarch64_get_qualifier_esize (opnds[0].qualifier))
+ {
+ case 4: /* e.g. MOV Wd, #<imm32>. */
+ {
+ int imm32 = opnd->imm.value;
+ snprintf (buf, size, "#0x%-20x\t// #%d", imm32, imm32);
+ }
+ break;
+ case 8: /* e.g. MOV Xd, #<imm64>. */
+ snprintf (buf, size, "#0x%-20" PRIx64 "\t// #%" PRIi64,
+ opnd->imm.value, opnd->imm.value);
+ break;
+ default: assert (0);
+ }
+ break;
+
case AARCH64_OPND_FPIMM0:
snprintf (buf, size, "#0.0");
break;