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

Re: [PATCH] ARM: exclude fixed_regs for stack-alignment save/restore


On Jun 14, 2012, at 10:16 AM, Roland McGrath wrote:
> But if e.g. I use -ffixed-r9 then I think it's a reasonable expectation
> that no code is generated that touches r9 in any way, shape, or form.

Also,  I can't help but wonder if global_regs is respected.  In theory, people are allowed to declare global registers, and nothing should be stopping them, though, this is abi breaking, and one does need to recompile the world as I recall to use it, so, most people don't use it and can't use it, but the bare metal people can.

Your change looks good to me.

I'll note in passing that cse.c does:

/* Determine whether register number N is considered a fixed register for the                             
   purpose of approximating register costs.                                                               
   It is desirable to replace other regs with fixed regs, to reduce need for                              
   non-fixed hard regs.                                                                                   
   A reg wins if it is either the frame pointer or designated as fixed.  */
#define FIXED_REGNO_P(N)  \
  ((N) == FRAME_POINTER_REGNUM || (N) == HARD_FRAME_POINTER_REGNUM \
   || fixed_regs[N] || global_regs[N])


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