Commit 55492b32 by Nick Clifton Committed by Nick Clifton

Allow any general purpose register to hold an SImode (or smaller) value.

From-SVN: r49213
parent 72c7c913
2002-01-25 Nick Clifton <nickc@cambridge.redhat.com>
* config/arm/arm.c (arm_hard_regno_mode_ok): Allow any general
purpose register to hold an SImode (or smaller) value.
2002-01-25 Jakub Jelinek <jakub@redhat.com> 2002-01-25 Jakub Jelinek <jakub@redhat.com>
* unwind-dw2-fde-glibc.c: If inhibit_libc, use __register_frame* * unwind-dw2-fde-glibc.c: If inhibit_libc, use __register_frame*
......
...@@ -9139,24 +9139,20 @@ arm_hard_regno_mode_ok (regno, mode) ...@@ -9139,24 +9139,20 @@ arm_hard_regno_mode_ok (regno, mode)
return (NUM_REGS (mode) < 2) || (regno < LAST_LO_REGNUM); return (NUM_REGS (mode) < 2) || (regno < LAST_LO_REGNUM);
if (regno <= LAST_ARM_REGNUM) if (regno <= LAST_ARM_REGNUM)
/* If the register is a general purpose ARM register we allow /* We allow an SImode or smaller value to be stored in any
it only if it not a special register (SP, LR, PC) and only general purpose register. This does not mean, for example
if there will be enough (non-special) registers to hold the that GCC will choose to store a variable in the stack pointer
entire value. */ since it is a fixed register. But it is important to allow
{ access to these special registers, so that they can be
/* As a special exception we allow an SImode value to be referenced from C code via the asm assembler alias, eg:
"assigned" to the stack pointer. This is not intended
to actually allow a value to be stored in the SP, but so register char * stack_ptr asm ("sp");
that the stack pointer can be referenced from C code like
this: For any mode requiring more than one register to hold the
value we restrict the choice so that r13, r14, and r15
register char * stack_ptr asm ("sp"); cannot be part of the register set. */
return (NUM_REGS (mode) <= 1)
This expression is actually used in newlib... */ || (regno < (SP_REGNUM - (unsigned) NUM_REGS (mode)));
if (mode == SImode && regno == SP_REGNUM)
return 1;
return regno < (SP_REGNUM - (unsigned) NUM_REGS (mode));
}
if ( regno == FRAME_POINTER_REGNUM if ( regno == FRAME_POINTER_REGNUM
|| regno == ARG_POINTER_REGNUM) || regno == ARG_POINTER_REGNUM)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment