Richard Sandiford via Gcc-patches <gcc-patches@gcc.gnu.org> writes: > How about instead: > > (1) Define a new ASLK_* flag for assign_stack_local_1. > > (2) When the flag is set, make: > > if (alignment_in_bits > MAX_SUPPORTED_STACK_ALIGNMENT) > { > alignment_in_bits = MAX_SUPPORTED_STACK_ALIGNMENT; > alignment = MAX_SUPPORTED_STACK_ALIGNMENT / BITS_PER_UNIT; > } > > increase the size by (new_align - old_align).
Er, I meant old_align - new_align here :-) > > (3) When the flag is set, and the new alignment is smaller than the > original alignment, call align_dynamic_address before creating > the MEM, as in your original patch. > > There are probably other details, but it looks like that should cope > with the x86 dynamic stack realignment scheme even with the max-based > alignment calculation discussed above. > > Thanks, > Richard