Liste des Groupes | Revenir à c arch |
Terje Mathisen wrote:No, no! IMAC is three in, two out, so in your syntax:>I thought about IMAC but it was a bit too much.
Very nice!
>
This means that you can do integer IMAC(), right?
>
(hi, lo) = imac(a, b, c); // == a*b+c
>
The only thing even nicer from the perspective of writing arbitrary precision library code would be IMAA, i.e. a*b+c+d since that is the largest combination which is guaranteed to never overflow the double register target field.
>
And unlike FMA there is no precision gain in IMAC, just convenience.
IMAC requires 6 register specifiers, 2 dest and 4 source if you don't
care about overflow/carry on the accumulate.
2-wide = 2-wide + narrow * narrow
It needs 7 registers, 3 dest and 4 source if you want overflow/carryOtoh, if you do have all the wide add forms you outlined below, including the "full adder" with three inputs and a wirde/pair output, then the carry propagations do become easier, and just doing
on the accumulate.
3-wide = 2-wide + narrow * narrow
Les messages affichés proviennent d'usenet.