public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>
To: Ian Lance Taylor <ian@zembu.com>
Cc: binutils@sourceware.cygnus.com
Subject: Re: Overflow fix (was Problems with trampoline.S with 64 bit binutils)
Date: Wed, 28 Jul 1999 15:57:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.10.9907290823170.10493-100000@mullet.itr.unisa.edu.au> (raw)
In-Reply-To: <19990728224953.712.qmail@daffy.airs.com>

On 28 Jul 1999, Ian Lance Taylor wrote:

>    Date: Wed, 28 Jul 1999 18:39:18 +0930 (CST)
>    From: Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>
> 
>    Is it OK for me to check this one in, Ian?  It's almost in the "obvious
>    fix" category...
> 
> Almost.
> 
>    > +	      mask <<= size * 8 - (fixP->fx_signed ? 1 : 0);
> 
> If size is 4 and fixP->fx_signed is not set, then this will do a left
> shift by 32.  If mask is itself 32 bits, then this is not defined by
> ANSI C.  There are in fact compilers which will turn this into a
> no-op: they generate a shift by 32 instruction, which is masked into a
> shift by 0 instruction.
> 
> That's why I had the two shifts in the old code, and I think we need
> to keep that.

size == 4  =>  sizeof (mask) > 4.  Surely ANSI C doesn't restrict shift
counts of 64 bit quantities to 32??

  reply	other threads:[~1999-07-28 15:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.10.9907272027230.8678-100000@mullet.itr.unisa.edu.au>
1999-07-28  2:09 ` Alan Modra
1999-07-28 15:50   ` Ian Lance Taylor
1999-07-28 15:57     ` Alan Modra [this message]
1999-07-28 16:03       ` Ian Lance Taylor
1999-07-28 19:28     ` make check Alan Modra
1999-07-28 19:35       ` more "make check" issues Alan Modra
1999-08-03  9:43         ` Ian Lance Taylor
1999-07-29  9:38       ` make check Jason Merrill
1999-07-29 11:29       ` Ian Lance Taylor
1999-07-29 11:37         ` Ulrich Drepper
1999-07-29 17:22           ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.10.9907290823170.10493-100000@mullet.itr.unisa.edu.au \
    --to=alan@spri.levels.unisa.edu.au \
    --cc=binutils@sourceware.cygnus.com \
    --cc=ian@zembu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).