ARM constant folding bug?
Jonathan S. Shapiro
shap@eros-os.com
Fri Aug 3 16:36:00 GMT 2007
On Fri, 2007-08-03 at 17:24 +0100, Dave Korn wrote:
> > I am not surprised that there is different behavior for different
> > targets, but I am very surprised that *this* behavior is different. This
> > optimization ought to be happening in the mid-end, and it ought to be
> > entirely machine independent.
>
> I'm a bit surprised too. But it occurs to me that the ARM, unlike the i386
> and m68k, is bi-endian. Perhaps you can't actually know which mode it's
> running in at compile time and /have/ to test it at runtime?
That seems counter-intuitive, since a given compiler instance is
configured for a target with a particular endian-ness. Even if the
compiler can evade knowledge, the assembler surely must know. Of course,
I am not running the assembler here.
In any case, an interesting hypothesis. Would also explain some code
pessimization issues for ARM targets more generally.
shap
More information about the Gcc
mailing list