This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: splitting addhi, addsi


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]