[PATCH] S/390: Fix objdump output of larl operand - take 2
Andreas Krebbel
krebbel@linux.vnet.ibm.com
Thu Sep 10 09:08:00 GMT 2009
> How about (memaddr + (int) value + (int) value)? That avoids the
> overflow without the need for long long.
Right - that would be better. I've just committed the attached patch.
Thanks!
Bye,
-Andreas-
2009-09-10 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* s390-dis.c (print_insn_s390): Avoid 'long long'.
Index: opcodes/s390-dis.c
===================================================================
--- opcodes/s390-dis.c.orig 2009-09-10 10:14:21.000000000 +0200
+++ opcodes/s390-dis.c 2009-09-10 10:56:29.000000000 +0200
@@ -222,8 +222,8 @@ print_insn_s390 (bfd_vma memaddr, struct
else if (operand->flags & S390_OPERAND_CR)
(*info->fprintf_func) (info->stream, "%%c%i", value);
else if (operand->flags & S390_OPERAND_PCREL)
- (*info->print_address_func) (memaddr +
- (((long long)(int)value) << 1), info);
+ (*info->print_address_func) (memaddr + (int)value + (int)value,
+ info);
else if (operand->flags & S390_OPERAND_SIGNED)
(*info->fprintf_func) (info->stream, "%i", (int) value);
else
More information about the Binutils
mailing list