I have a question about the DRAP register (used for dynamic stack alignment) and about reserving/using hard registers in general. I am trying to understand where, if a drap register is allocated, GCC is told not to use it during general register allocation. There must be some code somewhere for this but I cannot find it.
I am trying to implement dynamic stack alignment on MIPS and because there is so much code for the x86 dynamic stack alignment I am trying to incorporate bits of it as I understrand what I need instead of just turning it all on at once and getting completely lost. Right now I am using register 16 on MIPS to access incoming arguments in a function that needs dynamic alignment, so it is my drap register if my understanding of the x86 code and its use of a DRAP register is correct. I copy the stack pointer into reg 16 before I align the stack pointer (during expand_prologue). So far the only way I have found to stop the register allocator from also using reg 16 and thus messing up its value is to set fixed_regs[16]. But I don't see the x86 doing this for its DRAP register and I was wondering how it is handled there. I think setting fixed_regs[16] is why C++ tests with exception handling are not working for me because this register is not getting set and restored (since it is thought to be fixed) during code that uses throw and catch. Steve Ellcey sell...@imgtec.com