On Nov 29, 8:00 am, Cactus <[EMAIL PROTECTED]> wrote:
> On Nov 29, 1:28 am, "Bill Hart" <[EMAIL PROTECTED]> wrote:
>
>
>
> > It's true these are not used much. But at this point we definitely
> > don't want to break strict compatibility with GMP.
>
> > I don't have an opinion on the other options though. Perhaps someone
> > else has something meaningful...
>
> > Bill.
>
> > 2008/11/29  <[EMAIL PROTECTED]>:
>
> > > Now I notice that some of the existing mpn fn's have alternate entry 
> > > points
> > > eg mpn_add_n and mpn_add_nc where you have an extra parameter to specify a
> > > carry in .
> > > I can do this to all the new K8 asm fn's , it pretty trivial. It just a
> > > question of how to call them , for example
>
> > > .align 16
> > > mpn_add_n:
> > > mov $0,carryreg
> > > .align 16
> > > mpn_add_nc:
> > > here is the usual stuff
>
> > > Here we either align it and have to skip over 16 bytes (which is at least 
> > > 1
> > > extra cycle) or we dont bother with the alignment for the _nc version , 
> > > and
> > > have a penalty for an unaligned fn call (which costs what?) .
>
> > > The other way is to just have mpn_add_nc , and make mpn_add_n a macro 
> > > with a
> > > carry in of zero.This would  break strict compatibility with gmp.
>
> > > Or perhaps not bother , as their not used much.
>
> > > Any thoughts? on this , preferances?
>
> I agree with Bill - we should keep strict compatibility with GMP
> because it is important that MPIR is a 'drop-in' replacement for it.
>
> As long as the most used one is the fastest and the hit on the least
> used one is small, I don't think the performance hit is worth worrying
> about.
>
> If the hit was large we could give the library user the choice of
> duplicating the code using a macro of the form :
>
> macro madd_n
>    align 16
>    here is the usual stuff
> endm
>
> mpn_add_n :
>   ifdef MAXIMISE_SPEED
>
> madd_n 0
>   elif REDUCE_CODE_SIZE
>       mov 0, carry_reg
>   endif
> mpn_add_nc :
>     madd_n carry_reg
>
> or something similar.
>
>     Brian

The pseudocode in my last post was incomplete as I hit the wrong key
during my editing and posted prematurely by mistake. But, hopefully,
the intent is clear.

   Brian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to