Hi All,

Was porting gcc 4.8.1 to the private target which has 8 bit regs  and
can be used as pair for 16bit like  AB ,CD but not BC or AD.

I was stuck in the type promotion like

int i;
unsigned char c;

int test ()
{
  i =c;
}

defined  the zero_extendqihi2 pattern for the above c construct  like

(define_expand zero_extendqihi2
[(set (operand:hi 0 "" """)
 (zero_extend:hi (operand:qi 1)))]
""
if(!reload_completed)
{
if(operands[1] != REG)
operands[1]= force_reg(QI,operands[1]);

/* Here i need to enforce gcc to use the next consective paired reg
like B  if operands[1] is in  A reg or D if  operands[1] is in  C */
}
 )

How do i module the above reguirement in the backend  ?


Thank you
~Umesh

Reply via email to