public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: How to write pattern for addition with carry operation
@ 2008-06-07  7:33 Uros Bizjak
  2008-06-07  9:19 ` Mohamed Shafi
  0 siblings, 1 reply; 5+ messages in thread
From: Uros Bizjak @ 2008-06-07  7:33 UTC (permalink / raw)
  To: GCC; +Cc: Mohamed Shafi

Hello!

> The 16bit target that i am porting to gcc4.1.2 doesn't have any
> instructions for 32bit operations. But for addition and subtraction
> there is
> addc
> subc
> instructions that consider carry bit also. Presently i have patterns
> for SImode addition and subtraction such that the template will have
>
> add %0, %1\naddc %N0, %N1
> sub %0, %1\nsubc %N0, %N1
>
> Will it be possible for me to write separate patterns for the
> instructions add and addc?
>   

You can look into config/i386.md, how i.e. adddi3 is expanded and split 
in case of !TARGET_64BIT.

Uros.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* How to write pattern for addition with carry operation
@ 2008-06-07  5:37 Mohamed Shafi
  0 siblings, 0 replies; 5+ messages in thread
From: Mohamed Shafi @ 2008-06-07  5:37 UTC (permalink / raw)
  To: GCC

Hello all,

The 16bit target that i am porting to gcc4.1.2 doesn't have any
instructions for 32bit operations. But for addition and subtraction
there is
addc
subc
instructions that consider carry bit also. Presently i have patterns
for SImode addition and subtraction such that the template will have

add %0, %1\naddc %N0, %N1
sub %0, %1\nsubc %N0, %N1

Will it be possible for me to write separate patterns for the
instructions add and addc?

Regards,
Shafi

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

end of thread, other threads:[~2008-06-08  1:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-07  7:33 How to write pattern for addition with carry operation Uros Bizjak
2008-06-07  9:19 ` Mohamed Shafi
2008-06-07 11:40   ` Uros Bizjak
2008-06-08  1:30   ` Ian Lance Taylor
  -- strict thread matches above, loose matches on Subject: below --
2008-06-07  5:37 Mohamed Shafi

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).