This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LRA spill/fill memory alignment question


I have a question about spilling variables and alignment requirements.
There is currently code that allows one to declare local variables with
an alignment that is greater than MAX_STACK_ALIGNMENT.  In that case
expand_stack_vars calls allocate_dynamic_stack_space to create a
pointer to properly aligned stack space.  (There is actually a bug
in this code, PR 65315, but I have submitted a patch.)

But there does not seem to be any way to do spills and fills into
memory that has an alignment requirement greater than MAX_STACK_ALIGNMENT.
Is that correct?  I am looking at MIPS using the LRA allocator.  I was
hoping there was some way to spill 16 byte registers into a 16 byte
aligned spill slot even if the MAX_STACK_ALIGNMENT is 8 bytes.

I know x86 has some platform specific code to dynamically increase the
stack alignment and I think that is how they handle this situation but
I don't see any other platforms using that technique and I was wondering
if there is any more generalized method for spilling registers to memory
with an alignment requirement greater than MAX_STACK_ALIGNMENT.

Steve Ellcey
sellcey@imgtec.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]