public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* splitting addhi, addsi
@ 2002-10-21  8:26 Pierre Mallard
  2002-10-21 12:30 ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Pierre Mallard @ 2002-10-21  8:26 UTC (permalink / raw)
  To: gcc

Hi,
I'm working on the c compiler gcc-3.0.4 to port code
for my cpu.
In order to feel right my delay pipe of 3 slot I need
to cut every expression in code of one length
instruction.
So I need to have my addhi and addsi cut with sthg
like a define_split or things like this and I need to
take care of the carry...
I'm wondering how I can define a define_insn that do
not match the pattern of addqi and that realise the
add_with_carry instruction :

(plus:HI (reg:HI)(reg:HI))
->
(plus:QI (reg:QI)(reg:QI))
(plus_with_carry:QI (reg:QI)(reg:QI))...
Thanks,Regards
Pierre Mallard



___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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

* Re: splitting addhi, addsi
  2002-10-21  8:26 splitting addhi, addsi Pierre Mallard
@ 2002-10-21 12:30 ` Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2002-10-21 12:30 UTC (permalink / raw)
  To: Pierre Mallard; +Cc: gcc

On Mon, Oct 21, 2002 at 09:56:20AM +0200, Pierre Mallard wrote:
> So I need to have my addhi and addsi cut with sthg
> like a define_split or things like this and I need to
> take care of the carry...

See the x86 adddi to add/adc splits.


r~

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

* Re: splitting addhi, addsi
       [not found] <200210211213.29760.diwil@eis.ru>
  2002-10-21  9:45 ` Pierre Mallard
@ 2002-10-21 10:20 ` Pierre Mallard
  1 sibling, 0 replies; 5+ messages in thread
From: Pierre Mallard @ 2002-10-21 10:20 UTC (permalink / raw)
  To: diwil; +Cc: gcc

Hi
Ok then looks working good ... until .. :
if ever gcc decide to separate completly the two expr
(add and add_with_carry) and put between it some other
code that change the carry, result will be wrong.
How can I do to make it impossible (i.e. allowed only
expression that do not affect the cc reg between add
and add_with_carry)?

Thanks a lot, Regards
Pierre
--- Dmitry <diwil@eis.ru> a écrit : > HOw about
unspec?
> 
> (define_insn "*plus_with_carry"
> [(set (reg:QI  XX) 
>        (unspec:QI [(reg:QI XX) (reg:QI YY)]
> 1234567))]
> "condition"
> "asm_code_for_plus_and_carry %0 %1 %2"
> [attributes])
> 
> Then:
>  (plus:HI (reg:HI)(reg:HI))
> splits into:
>  (plus:QI (reg:QI)(reg:QI))
>  (unspec:QI [(reg:QI)(reg:QI)] 1234567)...
> 
> ~d
> 
> 
> On Monday 21 October 2002 11:56, Pierre Mallard
> wrote:
> > Hi,
> > I'm working on the c compiler gcc-3.0.4 to port
> code
> > for my cpu.
> > In order to feel right my delay pipe of 3 slot I
> need
> > to cut every expression in code of one length
> > instruction.
> > So I need to have my addhi and addsi cut with sthg
> > like a define_split or things like this and I need
> to
> > take care of the carry...
> > I'm wondering how I can define a define_insn that
> do
> > not match the pattern of addqi and that realise
> the
> > add_with_carry instruction :
> >
> > (plus:HI (reg:HI)(reg:HI))
> > ->
> > (plus:QI (reg:QI)(reg:QI))
> > (plus_with_carry:QI (reg:QI)(reg:QI))...
> > Thanks,Regards
> > Pierre Mallard
> >
> >
> >
> >
>
___________________________________________________________
> > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite
> et en français !
> > Yahoo! Mail : http://fr.mail.yahoo.com
> 
> -- 
>
/********************************************************************
>      ("`-''-/").___..--''"`-._     (\   Dimmy the
> Wild      UA1ACZ
>       `6_ 6  )   `-.  (     ).`-.__.`)  Enterprise
> Information Sys 
>       (_Y_.)'  ._   )  `._ `. ``-..-'   Nevsky
> prospekt,   20 / 44
>     _..`--'_..-_/  /--'_.' ,'           Saint
> Petersburg,   Russia
>    (il),-''  (li),'  ((!.-'             +7 (812) 
> 3468202, 5585314
> 
>
********************************************************************/
>  

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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

* Re: splitting addhi, addsi
       [not found] <200210211213.29760.diwil@eis.ru>
@ 2002-10-21  9:45 ` Pierre Mallard
  2002-10-21 10:20 ` Pierre Mallard
  1 sibling, 0 replies; 5+ messages in thread
From: Pierre Mallard @ 2002-10-21  9:45 UTC (permalink / raw)
  To: diwil; +Cc: gcc

Hi
Ok then looks working good ... until .. :
if ever gcc decide to separate completly the two expr
(add and add_with_carry) and put between it some other
code that change the carry, result will be wrong.
How can I do to make it impossible (i.e. allowed only
expression that do not affect the cc reg between add
and add_with_carry)?

Thanks a lot, Regards
Pierre
--- Dmitry <diwil@eis.ru> a écrit : > HOw about
unspec?
> 
> (define_insn "*plus_with_carry"
> [(set (reg:QI  XX) 
>        (unspec:QI [(reg:QI XX) (reg:QI YY)]
> 1234567))]
> "condition"
> "asm_code_for_plus_and_carry %0 %1 %2"
> [attributes])
> 
> Then:
>  (plus:HI (reg:HI)(reg:HI))
> splits into:
>  (plus:QI (reg:QI)(reg:QI))
>  (unspec:QI [(reg:QI)(reg:QI)] 1234567)...
> 
> ~d
> 
> 
> On Monday 21 October 2002 11:56, Pierre Mallard
> wrote:
> > Hi,
> > I'm working on the c compiler gcc-3.0.4 to port
> code
> > for my cpu.
> > In order to feel right my delay pipe of 3 slot I
> need
> > to cut every expression in code of one length
> > instruction.
> > So I need to have my addhi and addsi cut with sthg
> > like a define_split or things like this and I need
> to
> > take care of the carry...
> > I'm wondering how I can define a define_insn that
> do
> > not match the pattern of addqi and that realise
> the
> > add_with_carry instruction :
> >
> > (plus:HI (reg:HI)(reg:HI))
> > ->
> > (plus:QI (reg:QI)(reg:QI))
> > (plus_with_carry:QI (reg:QI)(reg:QI))...
> > Thanks,Regards
> > Pierre Mallard
> >
> >
> >
> >
>
___________________________________________________________
> > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite
> et en français !
> > Yahoo! Mail : http://fr.mail.yahoo.com
> 
> -- 
>
/********************************************************************
>      ("`-''-/").___..--''"`-._     (\   Dimmy the
> Wild      UA1ACZ
>       `6_ 6  )   `-.  (     ).`-.__.`)  Enterprise
> Information Sys 
>       (_Y_.)'  ._   )  `._ `. ``-..-'   Nevsky
> prospekt,   20 / 44
>     _..`--'_..-_/  /--'_.' ,'           Saint
> Petersburg,   Russia
>    (il),-''  (li),'  ((!.-'             +7 (812) 
> 3468202, 5585314
> 
>
********************************************************************/
>  

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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

* splitting addhi, addsi
@ 2002-10-21  8:23 Pierre Mallard
  0 siblings, 0 replies; 5+ messages in thread
From: Pierre Mallard @ 2002-10-21  8:23 UTC (permalink / raw)
  To: gcc

Hi,
I'm working on the c compiler gcc-3.0.4 to port code
for my cpu.
In order to feel right my delay pipe of 3 slot I need
to cut every expression in code of one length
instruction.
So I need to have my addhi and addsi cut with sthg
like a define_split or things like this and I need to
take care of the carry...
I'm wondering how I can define a define_insn that do
not match the pattern of addqi and that realise the
add_with_carry instruction :

(plus:HI (reg:HI)(reg:HI))
->
(plus:QI (reg:QI)(reg:QI))
(plus_with_carry:QI (reg:QI)(reg:QI))...
Thanks,Regards
Pierre Mallard



___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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

end of thread, other threads:[~2002-10-21 17:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-21  8:26 splitting addhi, addsi Pierre Mallard
2002-10-21 12:30 ` Richard Henderson
     [not found] <200210211213.29760.diwil@eis.ru>
2002-10-21  9:45 ` Pierre Mallard
2002-10-21 10:20 ` Pierre Mallard
  -- strict thread matches above, loose matches on Subject: below --
2002-10-21  8:23 Pierre Mallard

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