public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* type promotion
@ 2014-01-29 20:12 Umesh Kalappa
  2014-02-09 12:27 ` Richard Sandiford
  0 siblings, 1 reply; 2+ messages in thread
From: Umesh Kalappa @ 2014-01-29 20:12 UTC (permalink / raw)
  To: gcc

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-09 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-29 20:12 type promotion Umesh Kalappa
2014-02-09 12:27 ` Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).