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

regmove.c and call_used_regs[]

I am working on a port with gcc-4.0.2, and I've been getting a segmentation fault when call_used_regs[] is referenced with a pseudo register in fixup_match_2() in regmove.c.

   if (call_used_regs[REGNO(dst)])
       || find_reg_fusage (p, CLOBBER, dst))

regmove_optimize() calls fixup_match_2(), and checks that REGNO(dst) is a pseudo register, or it will skip the piece of code that calls fixup_match_2().

         if (!REG_P (dst)
         || REG_LIVE_LENGTH (REGNO (dst)) < 0
         || GET_MODE (src) != GET_MODE (dst))
         if (REGNO (src) < FIRST_PSEUDO_REGISTER)
         if (GET_CODE (SET_SRC (set)) == PLUS
             && GET_CODE (XEXP (SET_SRC (set), 1)) == CONST_INT
             && XEXP (SET_SRC (set), 0) == src
             && fixup_match_2 (insn, dst, src,
                   XEXP (SET_SRC (set), 1),

Is there another area within regmove_optimize() that constrains the dst to be a real register? That would prevent the segmentation fault when call_used_regs[] is accessed with a pseudo register.

Thanks for your help.



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