[lkml]   [2000]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Preventing gcc from aligning stack???
    Jeff Garzik <> said:
    > Is this really necessary in modern gcc versions, such as 2.95 and
    > thereafter?
    > Snip 2.3.x arch/i386/Makefile:
    > # prevent gcc from keeping the stack 16 byte aligned
    > CFLAGS += $(shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null
    > -xc /dev/null >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2";
    > fi)

    Yes it is. New gcc's (try to) keep the stack aligned at 16 bytes. The
    kernel stack is 8Kb on ia32; the 16byte alignment is mostly for floating
    point performance on Pentium and up, and floating point is forbidden in the
    kernel anyway. So this is a sizeable savings for negligible performance

    My question in this vein would be the -fno-strength-reduce. The gcc bug
    that placed this in the kernel was in gcc-2.7.2, and was worked around in by just making this option unconditional. Both 2.2.15pre4 and
    2.3.41pre2 at least demand gcc- as minimal version.
    Horst von Brand
    Casilla 9G, Viña del Mar, Chile +56 32 672616

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:56    [W:0.020 / U:1.748 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site