[BACK]Return to gf2m_mul_w.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / asm

Diff for /OpenXM_contrib2/asir2000/asm/gf2m_mul_w.c between version 1.3 and 1.5

version 1.3, 2000/08/22 05:03:55 version 1.5, 2018/03/29 01:32:50
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2000/asm/gf2m_mul_w.c,v 1.2 2000/08/21 08:31:17 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/asm/gf2m_mul_w.c,v 1.4 2001/10/09 01:36:03 noro Exp $
 */  */
 unsigned int NNgf2m_mul_11(unsigned int *h, unsigned int a, unsigned int b)  unsigned int NNgf2m_mul_11(unsigned int *h, unsigned int a, unsigned int b)
 {  {
         __asm    __asm
         {    {
         push ebx    push ebx
         mov ecx,a    mov ecx,a
         mov edx,b    mov edx,b
 GF2ML0:    xor ebx,ebx
         xor ebx,ebx    xor eax,eax
         xor eax,eax    add edx,edx
         add edx,edx    jnc GF2ML1
         jnc GF2ML1    xor eax,ecx
         xor eax,ecx  
 GF2ML1:  GF2ML1:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML2    jnc GF2ML2
         xor eax,ecx    xor eax,ecx
 GF2ML2:  GF2ML2:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML3    jnc GF2ML3
         xor eax,ecx    xor eax,ecx
 GF2ML3:  GF2ML3:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML4    jnc GF2ML4
         xor eax,ecx    xor eax,ecx
 GF2ML4:  GF2ML4:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML5    jnc GF2ML5
         xor eax,ecx    xor eax,ecx
 GF2ML5:  GF2ML5:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML6    jnc GF2ML6
         xor eax,ecx    xor eax,ecx
 GF2ML6:  GF2ML6:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML7    jnc GF2ML7
         xor eax,ecx    xor eax,ecx
 GF2ML7:  GF2ML7:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML8    jnc GF2ML8
         xor eax,ecx    xor eax,ecx
 GF2ML8:  GF2ML8:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML9    jnc GF2ML9
         xor eax,ecx    xor eax,ecx
 GF2ML9:  GF2ML9:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML10    jnc GF2ML10
         xor eax,ecx    xor eax,ecx
 GF2ML10:  GF2ML10:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML11    jnc GF2ML11
         xor eax,ecx    xor eax,ecx
 GF2ML11:  GF2ML11:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML12    jnc GF2ML12
         xor eax,ecx    xor eax,ecx
 GF2ML12:  GF2ML12:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML13    jnc GF2ML13
         xor eax,ecx    xor eax,ecx
 GF2ML13:  GF2ML13:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML14    jnc GF2ML14
         xor eax,ecx    xor eax,ecx
 GF2ML14:  GF2ML14:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML15    jnc GF2ML15
         xor eax,ecx    xor eax,ecx
 GF2ML15:  GF2ML15:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML16    jnc GF2ML16
         xor eax,ecx    xor eax,ecx
 GF2ML16:  GF2ML16:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML17    jnc GF2ML17
         xor eax,ecx    xor eax,ecx
 GF2ML17:  GF2ML17:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML18    jnc GF2ML18
         xor eax,ecx    xor eax,ecx
 GF2ML18:  GF2ML18:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML19    jnc GF2ML19
         xor eax,ecx    xor eax,ecx
 GF2ML19:  GF2ML19:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML20    jnc GF2ML20
         xor eax,ecx    xor eax,ecx
 GF2ML20:  GF2ML20:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML21    jnc GF2ML21
         xor eax,ecx    xor eax,ecx
 GF2ML21:  GF2ML21:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML22    jnc GF2ML22
         xor eax,ecx    xor eax,ecx
 GF2ML22:  GF2ML22:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML23    jnc GF2ML23
         xor eax,ecx    xor eax,ecx
 GF2ML23:  GF2ML23:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML24    jnc GF2ML24
         xor eax,ecx    xor eax,ecx
 GF2ML24:  GF2ML24:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML25    jnc GF2ML25
         xor eax,ecx    xor eax,ecx
 GF2ML25:  GF2ML25:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML26    jnc GF2ML26
         xor eax,ecx    xor eax,ecx
 GF2ML26:  GF2ML26:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML27    jnc GF2ML27
         xor eax,ecx    xor eax,ecx
 GF2ML27:  GF2ML27:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML28    jnc GF2ML28
         xor eax,ecx    xor eax,ecx
 GF2ML28:  GF2ML28:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML29    jnc GF2ML29
         xor eax,ecx    xor eax,ecx
 GF2ML29:  GF2ML29:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML30    jnc GF2ML30
         xor eax,ecx    xor eax,ecx
 GF2ML30:  GF2ML30:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML31    jnc GF2ML31
         xor eax,ecx    xor eax,ecx
 GF2ML31:  GF2ML31:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2ML32    jnc GF2ML32
         xor eax,ecx    xor eax,ecx
 GF2ML32:  GF2ML32:
         mov ecx,h    mov ecx,h
         mov DWORD PTR [ecx], ebx    mov DWORD PTR [ecx], ebx
         pop ebx    pop ebx
         }    }
 }  }
   
 unsigned int NNgf2m_mul_1h(unsigned int *h, unsigned int a, unsigned int b)  unsigned int NNgf2m_mul_1h(unsigned int *h, unsigned int a, unsigned int b)
 {  {
         __asm    __asm
         {    {
         push ebx    push ebx
         mov ecx,a    mov ecx,a
         mov edx,b    mov edx,b
         shl edx,0x10    shl edx,0x10
 GF2MLL0:    xor ebx,ebx
         xor ebx,ebx    xor eax,eax
         xor eax,eax    add edx,edx
         add edx,edx    jnc GF2MLL1
         jnc GF2MLL1    xor eax,ecx
         xor eax,ecx  
 GF2MLL1:  GF2MLL1:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL2    jnc GF2MLL2
         xor eax,ecx    xor eax,ecx
 GF2MLL2:  GF2MLL2:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL3    jnc GF2MLL3
         xor eax,ecx    xor eax,ecx
 GF2MLL3:  GF2MLL3:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL4    jnc GF2MLL4
         xor eax,ecx    xor eax,ecx
 GF2MLL4:  GF2MLL4:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL5    jnc GF2MLL5
         xor eax,ecx    xor eax,ecx
 GF2MLL5:  GF2MLL5:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL6    jnc GF2MLL6
         xor eax,ecx    xor eax,ecx
 GF2MLL6:  GF2MLL6:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL7    jnc GF2MLL7
         xor eax,ecx    xor eax,ecx
 GF2MLL7:  GF2MLL7:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL8    jnc GF2MLL8
         xor eax,ecx    xor eax,ecx
 GF2MLL8:  GF2MLL8:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL9    jnc GF2MLL9
         xor eax,ecx    xor eax,ecx
 GF2MLL9:  GF2MLL9:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL10    jnc GF2MLL10
         xor eax,ecx    xor eax,ecx
 GF2MLL10:  GF2MLL10:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL11    jnc GF2MLL11
         xor eax,ecx    xor eax,ecx
 GF2MLL11:  GF2MLL11:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL12    jnc GF2MLL12
         xor eax,ecx    xor eax,ecx
 GF2MLL12:  GF2MLL12:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL13    jnc GF2MLL13
         xor eax,ecx    xor eax,ecx
 GF2MLL13:  GF2MLL13:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL14    jnc GF2MLL14
         xor eax,ecx    xor eax,ecx
 GF2MLL14:  GF2MLL14:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL15    jnc GF2MLL15
         xor eax,ecx    xor eax,ecx
 GF2MLL15:  GF2MLL15:
         add eax,eax    add eax,eax
         adc ebx,ebx    adc ebx,ebx
         add edx,edx    add edx,edx
         jnc GF2MLL16    jnc GF2MLL16
         xor eax,ecx    xor eax,ecx
 GF2MLL16:  GF2MLL16:
         mov ecx,h    mov ecx,h
         mov DWORD PTR [ecx],ebx;    mov DWORD PTR [ecx],ebx;
         pop ebx    pop ebx
         }    }
 }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>