Oust HPPA PIC_OFFSET_TABLE_REGNUM_SAVED

Jeffrey A Law law@redhat.com
Tue, 16 Jan 2001 22:30:36 -0700


 In message <Pine.LNX.4.21.0101161848180.4272-100000@front.linuxcare.com.au>yo
u write:
  > +  if (flag_pic
  > +      && (GET_CODE (PIC_OFFSET_TABLE_SAVE_RTX) != REG
  > +	  || HARD_REGISTER_P (PIC_OFFSET_TABLE_SAVE_RTX)))
  > +    emit_move_insn (PIC_OFFSET_TABLE_SAVE_RTX,
  >  		    gen_rtx_REG (word_mode, PIC_OFFSET_TABLE_REGNUM));
I do have a question about this particular hunk of code.

I can't think of a condition where PIC_OFFSET_TABLE_SAVE_RTX would not be
a reg when this code was executed.  Simlarly I can't think of a case where
it would be a hard reg.

I think we should just emit the insn unconditionally unless you're aware
of some reason we can't shouldn't.

We're probably also going to need to emit a use of the %r19 and maybe %r27
on the return insns to ensure the pic register is restored after the
final call in any given function.

jeff