This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] S/390: Fix objdump output of larl operand - take 2
- From: "Andreas Krebbel" <krebbel at linux dot vnet dot ibm dot com>
- To: Andreas Schwab <schwab at redhat dot com>
- Cc: binutils at sourceware dot org, schwidefsky at de dot ibm dot com
- Date: Thu, 10 Sep 2009 11:08:44 +0200
- Subject: Re: [PATCH] S/390: Fix objdump output of larl operand - take 2
- References: <20090910083558.GA7853@bart> <m3vdjr9o9u.fsf@hase.home>
> 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