> On Sep 29, 4:05pm, Andrew Cagney wrote: > > >> The PowerOpen doco requires at least 220 bytes of space, beyond the end >> of stack, but forgets to mention that 220 isn't frame [16 byte] aligned. >> Consequently, an assert checking stack alignment fails and inferior >> calls on AIX doesn't work. That will learn me for not checking the math. >> >> Anyway, ok for "the late breaking 6.0 patch"? > > > I didn't see a patch attached, Doh! > but if it allocates 220 bytes of space > and then allocates any extra space to get to a 16 byte alignment, it's > okay with me. (Anything which is roughly equivalent is fine too - > e.g, aligning first and then allocating 224 bytes is okay too.) The code looks like this: sp = gdbarch_frame_align (current_gdbarch, old_sp); /* NOTE: cagney/2003-08-13: Skip the "red zone". For some ABIs, a function can use memory beyond the inner most stack address. AMD64 called that region the "red zone". Skip at least the "red zone" size before allocating any space on the stack. */ if (INNER_THAN (1, 2)) sp -= gdbarch_frame_red_zone_size (current_gdbarch); else sp += gdbarch_frame_red_zone_size (current_gdbarch); /* Still aligned? */ gdb_assert (sp == gdbarch_frame_align (current_gdbarch, sp)); so the attached modifies rs6000 to comply with red-zone's requirements vis: > By default, zero bytes are allocated. The value must be aligned > (@pxref{frame_align}). Andrew