Midlevel RTL part 1

law@redhat.com law@redhat.com
Tue Jan 22 08:37:00 GMT 2002


 In message <20020122161108.GB11966@atrey.karlin.mff.cuni.cz>, Jan Hubicka 
write
s:
 > Basically the optabs gets
 > invalid addresses that do not pass general_operand, so they are thrown
 > to move expander that do right thing to generaze PICified address load.
It has always been the case that the mov expanders have been passed items
which do not necessarily meet the operand predicates.  I've never bothered
to track this down.  But if we have done our jobs correctly we can deal with
this easily.  [ Note the same applies to the call patterns. ]

Find out precisely what is being passed down to the generic movXX patterns.
It's probably something simple like (symbol_ref foo) or
(const (plus symbol_ref const_int).  Accept them in generic_operand.

When we lower a movXX from generic to target rtl we need to arrange to
call the target rtl's expanders.  emit_move_insn may do this for you.
That process should ensure that the operands for movXX patterns are lowered
properly.

[ Or if we want to have a uniform interface, have a routine in optabs.c
  do the necessary work of calling the target expander during the lowering
  phase. ]


 > So I guess I need to allow some generic form of CONST in midRTL
I've already stated that the generic patterns must accept constants, in
fact, they must accept constants anywhere that they accept registers or
memory operands.

Furthermore, they must allow the various forms of a constant.  ie
CONST_INT, CONST_DOUBLE, SYMBOL_REF, LABEL_REF, CONST, etc.

jeff



More information about the Gcc-patches mailing list