This is the mail archive of the gcc-bugs@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]

Re: Very nasty C bug in gcc 2.95.2


> Date: Wed, 14 Mar 2001 23:21:35 -0800
> From: Ken Settle <ken@gordian.com>

> Apparently, if the offset is >= 1 && <= the stack alignment boundry, it
> uses ori, and it uses addi otherwise, on all 3 cpus mentioned (ppc, arm,
> mips).  I'm confused about why anyone would prefer an ori in this
> circumstance, rather than an addi.

It's because logical operations are easier to simplify than arithmetic
ones, so GCC tries to convert arithmetic operations to logical ones.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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