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 Schwab <schwab at redhat dot com>
- To: "Andreas Krebbel" <krebbel at linux dot vnet dot ibm dot com>
- Cc: binutils at sourceware dot org, schwidefsky at de dot ibm dot com
- Date: Thu, 10 Sep 2009 10:50:37 +0200
- Subject: Re: [PATCH] S/390: Fix objdump output of larl operand - take 2
- References: <20090910083558.GA7853@bart>
"Andreas Krebbel" <krebbel@linux.vnet.ibm.com> writes:
> @@ -222,7 +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 + (int) value, info);
> + (*info->print_address_func) (memaddr +
> + (((long long)(int)value) << 1), info);
How about (memaddr + (int) value + (int) value)? That avoids the
overflow without the need for long long.
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."