* RFA: Add PIC register to call_used_regs array
@ 2004-10-13 11:11 Nick Clifton
2004-10-29 1:11 ` Alexandre Oliva
0 siblings, 1 reply; 2+ messages in thread
From: Nick Clifton @ 2004-10-13 11:11 UTC (permalink / raw)
To: law, aoliva; +Cc: gcc-patches
Hi Jeff, Hi Alex,
Please may I have permission to apply the following patch ? It
fixes a problem with the mn10300 port when the -fpic switch is
used. The code in the CONDITIONAL_REGISTER_USAGE macro marks the
PIC_REG as being fixed but it does not add it to the call_used_regs
array. This causes an ICE in regclass.c:init_reg_sets_1() whent he
register sets are being initialised.
Tested by building an mn10300-elf toolchain.
Cheers
Nick
2004-10-13 Nick Clifton <nickc@redhat.com>
* config/mn10300/mn10300.h (CONDITIONAL_REGISTER_USAGE): When
adding the PIC register to the fixed_regs array, also add it
to the call_used_regs array.
Index: mn10300.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mn10300/mn10300.h,v
retrieving revision 1.83
diff -c -3 -p -r1.83 mn10300.h
*** mn10300.h 8 Sep 2004 18:45:14 -0000 1.83
--- mn10300.h 13 Oct 2004 11:00:13 -0000
*************** extern GTY(()) int mn10300_unspec_int_la
*** 215,221 ****
fixed_regs[i] = call_used_regs[i] = 1; \
} \
if (flag_pic) \
! fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
}
/* Return number of consecutive hard regs needed starting at reg REGNO
--- 215,222 ----
fixed_regs[i] = call_used_regs[i] = 1; \
} \
if (flag_pic) \
! fixed_regs[PIC_OFFSET_TABLE_REGNUM] = \
! call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;\
}
/* Return number of consecutive hard regs needed starting at reg REGNO
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFA: Add PIC register to call_used_regs array
2004-10-13 11:11 RFA: Add PIC register to call_used_regs array Nick Clifton
@ 2004-10-29 1:11 ` Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2004-10-29 1:11 UTC (permalink / raw)
To: Nick Clifton; +Cc: law, gcc-patches
On Oct 13, 2004, Nick Clifton <nickc@redhat.com> wrote:
> * config/mn10300/mn10300.h (CONDITIONAL_REGISTER_USAGE): When
> adding the PIC register to the fixed_regs array, also add it
> to the call_used_regs array.
This is ok, thanks, please check it in.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-29 0:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-13 11:11 RFA: Add PIC register to call_used_regs array Nick Clifton
2004-10-29 1:11 ` Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).