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

Re: BOOTSTRAP FAILURE: segementation fault in genattrtab under hpux 10.20



  In message <200011152210.RAA23951@hiauly1.hia.nrc.ca>you write:
  > > 0xb8af8 <layout_type+64>:       extrw,u r22,7,8,r3
  > > 0xb8afc <layout_type+68>:       ldo 4c8(r9),r20
  > > 0xb8b00 <layout_type+72>:       ldb  r20(sr0,r3),rp
  > > 0xb8b04 <layout_type+76>:       extrw,s rp,31,8,r19
  > > 0xb8b08 <layout_type+80>:       cmpb,<> r25,r19,0xb9968 <layout_type+3760
  > >
  > > 
  > > (gdb) stepi
  > > 0xb8b00 1235      if (TYPE_SIZE (type))
  > > (gdb) info reg r22 r3 r9 r20
  > > r22 7000000
  > > r3 7b03abb0
  > > r9 400050d8
  > > r20 400055a0
  > > (gdb) stepi
  > 
  > The problem is the base and index registers in the ldb instruction
  > have been interchanged by rename registers.  These are not interchangeable
  > on the pa because the space register for the instruction is loaded from
  > the base register.  Richard and Jeff, any thoughts on how to fix this
  > one?
Hmmm, presumably the insn was recognized because reload was completed and
we didn't expect anyone to be mucking around with this stuff again, but
regrename mucked things?

pa.c::basereg_operand
 /* Once reload has started everything is considered valid.  Reload should
     only create indexed addresses using the stack/frame pointer, and any
     others were checked for validity when created by the combine pass.

     Also allow any register when TARGET_NO_SPACE_REGS is in effect since
     we don't have to worry about the braindamaged implicit space register
     selection using the basereg only (rather than effective address)
     screwing us over.  */
  if (TARGET_NO_SPACE_REGS || reload_in_progress || reload_completed)
    return (GET_CODE (op) == REG);


I believe the easiest/best fix is to move REGNO_POINTER_FLAG into the REG
expression itself, then arrange for basereg_operand to check that flag.

THat would also allow us to clean up other warts in the PA backend.

jeff





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