This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] S/390: Fix invalid left shift of negative integer value.
- From: Dominik Vogt <vogt at linux dot vnet dot ibm dot com>
- To: binutils at sourceware dot org
- Date: Fri, 30 Oct 2015 15:27:39 +0100
- Subject: Re: [PATCH] S/390: Fix invalid left shift of negative integer value.
- Authentication-results: sourceware.org; auth=none
- References: <20151030120803 dot GA27648 at linux dot vnet dot ibm dot com> <874mh8a5k8 dot fsf at igel dot home>
- Reply-to: vogt at linux dot vnet dot ibm dot com
On Fri, Oct 30, 2015 at 01:45:11PM +0100, Andreas Schwab wrote:
> Dominik Vogt <vogt@linux.vnet.ibm.com> writes:
> > - return ((addr + (1 << align) - 1) & (-1 << align));
> > + return ((addr + (1 << align) - 1) & (~0u << align));
>
> This is not the same if valueT is wider than int.
You're right. I'll fix that and send a new patch in a different
thread with fixes for all such shifts in binutils_gdb.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
IBM Germany