On Mon, Aug 06, 2007 at 03:05:29PM +0200, Segher Boessenkool wrote:
Just to enlighten me on the subject, could you please explain me
what is wrong in the code ? Granted I found it awful, but even on
the GCC-4.2 page where -fno-toplevel-reorder is explained, it is
said that asm statements can be instantiated between functions
blocks, which is exactly what is used here.
Also, I could reproduce the problem with gcc 4.1 by simply declaring
the interrupts[] array before the asm statements. It looks like the
asm statements simply continue in the next section as the previously
instantiated block. Maybe ".section .text" should be explicitly noted
in each asm statement, but that seems strange to me.
Right now, I just removed -fno-unit-at-a-time which had been added
only for gcc-3.4, and it fixed gcc-4.2 (and even 4.1 produces cleaner
code after that).
Regards,
Willy
-