sparc: another fix for sparc stack alignment
authorMatthias Braun <matze@braunis.de>
Thu, 26 Jan 2012 17:14:25 +0000 (18:14 +0100)
committerMatthias Braun <matze@braunis.de>
Thu, 9 Feb 2012 17:01:51 +0000 (18:01 +0100)
ir/be/sparc/sparc_stackframe.c

index 816dc29..ce542b3 100644 (file)
@@ -321,7 +321,7 @@ static void process_frame_types(ir_graph *irg)
        if (!layout->sp_relative) {
                frame_size = (frame_size + frame_align-1) & ~(frame_align-1);
        } else {
-               unsigned misalign = SPARC_MIN_STACKSIZE % frame_align;
+               unsigned misalign = (SPARC_MIN_STACKSIZE+frame_size) % frame_align;
                frame_size += misalign;
        }