This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix simplify_immed_subreg


> On 12-jan-04, at 17:06, Richard Earnshaw wrote:
> > On ARM hosts a shift by a register is done modulo 256 (whereas clearly 
> > on
> > most platforms it must be done mod 32).
> 
> [I'm sorry I'll have to be political here...]
> 
> You probably mean "on x86 and friends" instead of "on most platforms".
> 
> For example, on PowerPC, it's done either mod 64 (for 32-bit ops) or
> mod 128 (for 64-bit ops); on Alpha, it's done mod 64; on M16C, shifts
> take a signed number (and shift either left or right accordingly), and
> have a range of either -8..8 or -16..16, other values give undefined
> results.  And as you mention, on ARM it's mod 256.
> 
> If you had said "on most machines" I would (grudgingly) not have
> replied at all, but I couldn't resist now ;-)
> 

I was over-generalizing.  Most likely it must be 'mod 
HOST_BITS_PER_WIDE_INT' on most machines, or other people would have 
spotted the bug before I did...

R.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]