lkml.org 
[lkml]   [2007]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] [2/58] x86_64: Tell gcc to only align stack to 8 bytes
    From
    Date
    Andi Kleen <ak@suse.de> writes:

    > Don't need 16 byte alignment because kernel doesn't use SSE2
    >
    ...
    > cflags-y += -maccumulate-outgoing-args
    > +cflags-y += -mpreferred-stack-boundary=4
    >

    From gcc manpage:

    -mpreferred-stack-boundary=num
    Attempt to keep the stack boundary aligned to a 2 raised to num
    byte boundary. If -mpreferred-stack-boundary is not specified, the
    default is 4 (16 bytes or 128 bits), except when optimizing for
    code size (-Os), in which case the default is the minimum correct
    alignment (4 bytes for x86, and 8 bytes for x86-64).

    So -mpreferred-stack-boundary=4 is the default and to align stack
    to 8 bytes you want -mpreferred-stack-boundary=3, not 4, IIUC.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-07-19 13:53    [W:3.016 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site