This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[RFC][ARM] Display disassembled Neon encoded constants identically on 32-bit and 64-bit hosts
- From: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- To: binutils at sourceware dot org
- Date: Fri, 28 May 2010 16:09:10 +0100
- Subject: [RFC][ARM] Display disassembled Neon encoded constants identically on 32-bit and 64-bit hosts
All,
Please can someone review and approve the attached patch?
This patch ensures that both 32-bit and 64-bit hosts display the same
value for Neon encoded constants when disassembling. This fixes the gas
testsuite failures 'Neon floating-point constants' and 'Neon instruction
coverage' when using a 64-bit host.
Tested targetting arm-none-eabi on a x86_64-none-linux-gnu host, and
natively on arm-unknown-linux-gnueabi.
Thanks,
Matt
Suggested opcodes/ChangeLog:
2010-05-28 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* arm-dis.c (print_insn_neon): Ensure disassembly of Neon
constants is the same on 32-bit and 64-bit hosts.
--
Matthew Gretton-Dann
Principal Engineer - PDSW Tools
ARM Ltd
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index c5b00da..3763c1e 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -2720,7 +2720,8 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
}
else
func (stream, "#%ld\t; 0x%.8lx",
- (long) (NEGATIVE_BIT_SET ? value | ~0xffffffffL : value),
+ (long) (((value & 0x80000000L) != 0)
+ ? value | ~0xffffffffL : value),
value);
break;