Re: Cost of handling misaligned access

Liste des GroupesRevenir à c arch 
Sujet : Re: Cost of handling misaligned access
De : mitchalsup (at) *nospam* aol.com (MitchAlsup1)
Groupes : comp.arch
Date : 19. Feb 2025, 00:31:49
Autres entêtes
Organisation : Rocksolid Light
Message-ID : <4437f472f21a302eadee66fcd1998d8f@www.novabbs.org>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Rocksolid Light
On Tue, 18 Feb 2025 22:34:48 +0000, BGB wrote:

Say, one could imagine an abstract model where Binary64 FADD works sort
of like:
   sgnA=valA>>63;
   sgnB=valA>>63;
   expA=(valA>>52)&2047;
   expB=(valB>>52)&2047;
   fraA=(valA&((1ULL<<52)-1));
   fraB=(valB&((1ULL<<52)-1));
   if(expA!=0)fraA|=1ULL<<52;
   if(expB!=0)fraB|=1ULL<<52;
   fraA=fraA<<9;  //9 sub ULP bits
   fraB=fraB<<9;
   shrA=(expB>=expA)?(expB-expA):0;
   shrB=(expA>=expB)?(expA-expA):0;
                        expA-expB
   sgn2A=sgnA; exp2A=expA; fra2A=fraA>>shrA;
   sgn2B=sgnB; exp2B=expB; fra2B=fraB>>shrB;
   //logical clock-edge here.
   fr1C_A=fra2A+fra2B;
   fr1C_B=fra2A-fra2B;
   fr1C_C=fra2B-fra2A;
   if(sgn2A^sgn2B)
   {
     if(fr1C_C>>63)
       { sgn1C=sgn2A; fra1C=fr1C_B; }
     else
       { sgn1C=sgn2B; fra1C=fr1C_C; }
   }
   else
     { sgn1C=!sgn2A; fra1C=fr1C_A; }
   //logical clock-edge here.
   if(fra2C>>62)
     { exp3C=exp2C+1; fra3C=fra2C>>1; }
   else
     { shl=clz64(fra2C)-2; exp3C=exp2C-shl; fra3C=fra2C<<shl; }
   //logical clock-edge here.
   if((exp3C>=2047) || (exp3C<=0))
     { sgnC=sgn2C; expC=(exp3C<=0)?0:2047; fraC=0; }
   else
   {
     sgnC=sgn2C; expC=exp3C; fraC=fra3C>>9;
     //if rounding is done, it goes here.
   }
   valC=(sgnC<<63)|(expC<<52)|fraC;
   //final clock edge.
   //result is now ready.

Date Sujet#  Auteur
13 Feb 25 * Re: Cost of handling misaligned access48Marcus
13 Feb 25 +- Re: Cost of handling misaligned access1Thomas Koenig
14 Feb 25 +* Re: Cost of handling misaligned access41BGB
14 Feb 25 i`* Re: Cost of handling misaligned access40MitchAlsup1
18 Feb 25 i `* Re: Cost of handling misaligned access39BGB
18 Feb 25 i  +* Re: Cost of handling misaligned access33MitchAlsup1
18 Feb 25 i  i+- Re: Cost of handling misaligned access1BGB
18 Feb 25 i  i`* Re: Cost of handling misaligned access31Michael S
18 Feb 25 i  i +- Re: Cost of handling misaligned access1Thomas Koenig
18 Feb 25 i  i +* Re: Cost of handling misaligned access26MitchAlsup1
18 Feb 25 i  i i`* Re: Cost of handling misaligned access25Terje Mathisen
18 Feb 25 i  i i `* Re: Cost of handling misaligned access24MitchAlsup1
19 Feb 25 i  i i  `* Re: Cost of handling misaligned access23Terje Mathisen
19 Feb 25 i  i i   `* Re: Cost of handling misaligned access22MitchAlsup1
19 Feb 25 i  i i    `* Re: Cost of handling misaligned access21BGB
20 Feb 25 i  i i     +- Re: Cost of handling misaligned access1Robert Finch
20 Feb 25 i  i i     +* Re: Cost of handling misaligned access5MitchAlsup1
20 Feb 25 i  i i     i+* Re: Cost of handling misaligned access2BGB
20 Feb 25 i  i i     ii`- Re: Cost of handling misaligned access1BGB
21 Feb 25 i  i i     i`* Re: Cost of handling misaligned access2Robert Finch
21 Feb 25 i  i i     i `- Re: Cost of handling misaligned access1BGB
21 Feb 25 i  i i     `* Re: Cost of handling misaligned access14BGB
22 Feb 25 i  i i      +- Re: Cost of handling misaligned access1Robert Finch
22 Feb 25 i  i i      `* Re: Cost of handling misaligned access12Robert Finch
23 Feb 25 i  i i       +* Re: Cost of handling misaligned access10BGB
23 Feb 25 i  i i       i`* Re: Cost of handling misaligned access9Michael S
24 Feb 25 i  i i       i +- Re: Cost of handling misaligned access1BGB
24 Feb 25 i  i i       i `* Re: Cost of handling misaligned access7Michael S
24 Feb 25 i  i i       i  +* Re: Cost of handling misaligned access4Robert Finch
24 Feb 25 i  i i       i  i+- Re: Cost of handling misaligned access1BGB
24 Feb 25 i  i i       i  i`* Re: Cost of handling misaligned access2MitchAlsup1
25 Feb 25 i  i i       i  i `- Re: Cost of handling misaligned access1BGB
25 Feb 25 i  i i       i  `* Re: Cost of handling misaligned access2MitchAlsup1
25 Feb 25 i  i i       i   `- Re: Cost of handling misaligned access1BGB
23 Feb 25 i  i i       `- Re: Cost of handling misaligned access1Robert Finch
18 Feb 25 i  i `* Re: Cost of handling misaligned access3BGB
19 Feb 25 i  i  `* Re: Cost of handling misaligned access2MitchAlsup1
19 Feb 25 i  i   `- Re: Cost of handling misaligned access1BGB
18 Feb 25 i  `* Re: Cost of handling misaligned access5Robert Finch
18 Feb 25 i   `* Re: Cost of handling misaligned access4BGB
18 Feb 25 i    `* Re: Cost of handling misaligned access3Brett
18 Feb 25 i     `* Re: Cost of handling misaligned access2Marcus
18 Feb 25 i      `- Re: Cost of handling misaligned access1BGB
17 Feb 25 `* Re: Cost of handling misaligned access5Terje Mathisen
17 Feb 25  +- Re: Cost of handling misaligned access1Thomas Koenig
17 Feb 25  `* Re: Cost of handling misaligned access3MitchAlsup1
17 Feb 25   `* Re: Cost of handling misaligned access2Terje Mathisen
17 Feb 25    `- Re: Cost of handling misaligned access1MitchAlsup1

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal