This is the mail archive of the 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]

Questions about dynamic stack realignment

This email is a follow-up to some earlier email I sent about
alignment of spills and fills but did not get any replies to.

After looking into that I have decided to look more into dynamically
realigning the stack so that my spills and fills would be aligned and I have
done some experiments with stack realignment and I am trying to understand
what hooks already exist and how to use them.

Currently mips just has:

	#define STACK_BOUNDARY (TARGET_NEWABI ? 128 : 64)

I added:


To try and get GCC to realign the stack to 128 bits if we are compiling
with the -mmsa option.  After doing this I found I needed to create a
TARGET_GET_DRAP_RTX that would return a register rtx when a drap was
needed so I did that and I got things to compile but I don't see any
code that actually realigned the stack.  It is not clear to me from the
documentation if there is shared code somewhere that should be trying to
realign the stack by changing the stack pointer given these definitions
or if I also need to add my own code to exand_prologue to do the stack
realignment myself.

I am also not sure if I understand the drap (Dynamic Realign Argument Pointer)
register functionality correctly.  My guess/understanding was that the drap
was used to access arguments in cases where the regular stack pointer may have
been changed in order to be aligned.  Is that correct?

Any help/advice on how the hooks for dynamically realigned stack are supposed
to all work together would be appreciated.

Steve Ellcey

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