[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: GCC 4.1.2 for ARM (in NetBSD 4) produces buggy code with-fno-strict-aliasing?
> By manually compiling wi.o and removing optimization options from the
> command line, I noticed that removing -fno-strict-aliasing causes the
> buggy code to be replaced with more reasonable code:
I think the real problem is -fregmove, which is enabled by -O2.
With -fno-regmove, it generates:
3b7c: e51b40d0 ldr r4, [fp, #-208]
3b80: e51b50d0 ldr r5, [fp, #-208]
3b84: e5943eb4 ldr r3, [r4, #3764]
3b88: e5944eb8 ldr r4, [r4, #3768]
Enabling -fstrict-aliasing (also enabled by -O2 but disabled by default
on NetBSD kernel) could make some difference as a side effect
because "ptr = (u_int32_t *)&sc->sc_stats;" statement may break
strict aliasing rule.
Main Index |
Thread Index |