bug report.

Gargoyle Crazy Master tanaka@boarderz.com
Sat May 1 12:18:00 GMT 2004


> > onlyjump_p (rtx insn)
> >   set = single_set (insn);      <------------------ pc_set (insn)
> 
> It isn't clear why you are quoting this line from onlyjump_p.  What 
> point are you trying to make here?  Are you assuming that the pattern of 
> a jump must be a set because we call single_set here?  That isn't true. 
>     The preferred form for a return insn is just a naked (return) in the 
> pattern of a jump.

For example :

(jump_insn 6 5 7 (parallel [
  (set (pc) if_then_else ....)
  (use ... or (clobber ...
   )

single_set is

#define single_set(I) (INSN_P (I) \
                       ? (GET_CODE (PATTERN (I)) == SET \
                          ? PATTERN (I) : single_set_1 (I)) \
                       : NULL_RTX)
#define single_set_1(I) single_set_2 (I, PATTERN (I))


single_set_2 (rtx insn, rtx pat)
{
  rtx set = NULL;
  int set_verified = 1;
  int i;

  if (GET_CODE (pat) == PARALLEL)

          switch (GET_CODE (sub))
            {
            case USE:
            case CLOBBER:
              break;

            case SET:
		    ------ cut ----
              break;


            default:
              return NULL_RTX;
            }
        }
    }
  return set;
}

JUMP_INSN cannot simply be handled by return NULL_RTX.


> > redirect_exp_1 (rtx *loc, rtx olabel, rtx nlabel, rtx insn)
> >       validate_change (insn, loc, gen_rtx_RETURN (VOIDmode), 1);
> 
> Again, it isn't clear what point you are trying to make here.
> 
> Why do you think this is wrong?  Did you get a gcc core dump?  Did you 
> have some code miscompiled?  Did you have some code poorly optimized? 
> Or something else?  Do you have a testcase?  It can be hard to comment 
> on a suggestion like this if we don't know what you are trying to fix.

I am developing a new CPU.
I cannot handle the following code:

example arm:

(define_insn "return"
 [(use LR_REGNUM)
  (return)]
 ""

I want to use addi's "Side Effects" instruction to return.

--------
Boarder. -> Katsuya TANAKA



More information about the Gcc mailing list