]> sourceware.org Git - glibc.git/commitdiff
* sysdeps/i386/asm-syntax.h (R, MEM, MEM_DISP, MEM_INDEX,
authorGreg McGary <greg@mcgary.org>
Mon, 26 Jun 2000 16:48:10 +0000 (16:48 +0000)
committerGreg McGary <greg@mcgary.org>
Mon, 26 Jun 2000 16:48:10 +0000 (16:48 +0000)
INSN1, INSN2, TEXT, GLOBL): Remove macros.
(ALIGN): Cleanup surrounding conditionals.
* sysdeps/i386/addmul_1.S: Replace asm-syntax macros with gas syntax.
Call ENTER/LEAVE macros.
* sysdeps/i386/mul_1.S: Replace asm-syntax macros with gas syntax.
* sysdeps/i386/submul_1.S: Likewise.

* sysdeps/i386/i586/addmul_1.S: Replace asm-syntax macros with gas
syntax.  Define & use symbolic argument stack offsets.  Call
ENTER/LEAVE macros.
* sysdeps/i386/i586/mul_1.S: Likewise.
* sysdeps/i386/i586/submul_1.S: Likewise.
2000-06-26  Greg McGary  <greg@mcgary.org>

* sysdeps/i386/asm-syntax.h (R, MEM, MEM_DISP, MEM_INDEX,
INSN1, INSN2, TEXT, GLOBL): Remove macros.
(ALIGN): Cleanup surrounding conditionals.

* sysdeps/i386/addmul_1.S: Replace asm-syntax macros with gas syntax.
Call ENTER/LEAVE macros.
* sysdeps/i386/mul_1.S: Replace asm-syntax macros with gas syntax.
* sysdeps/i386/submul_1.S: Likewise.

* sysdeps/i386/i586/addmul_1.S: Replace asm-syntax macros with gas
syntax.  Define & use symbolic argument stack offsets.  Call
ENTER/LEAVE macros.
* sysdeps/i386/i586/mul_1.S: Likewise.
* sysdeps/i386/i586/submul_1.S: Likewise.

ChangeLog
sysdeps/i386/addmul_1.S
sysdeps/i386/asm-syntax.h
sysdeps/i386/i586/addmul_1.S
sysdeps/i386/i586/mul_1.S
sysdeps/i386/i586/submul_1.S
sysdeps/i386/mul_1.S
sysdeps/i386/submul_1.S

index c3651b97dbc18ac356da2971312e942080a4fb9a..8b1b77cd5649cb82b44e5642c8e0cd2c96a317a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2000-06-26  Greg McGary  <greg@mcgary.org>
+
+       * sysdeps/i386/asm-syntax.h (R, MEM, MEM_DISP, MEM_INDEX,
+       INSN1, INSN2, TEXT, GLOBL): Remove macros.
+       (ALIGN): Cleanup surrounding conditionals.
+
+       * sysdeps/i386/addmul_1.S: Replace asm-syntax macros with gas syntax.
+       Call ENTER/LEAVE macros.
+       * sysdeps/i386/mul_1.S: Replace asm-syntax macros with gas syntax.
+       * sysdeps/i386/submul_1.S: Likewise.
+
+       * sysdeps/i386/i586/addmul_1.S: Replace asm-syntax macros with gas
+       syntax.  Define & use symbolic argument stack offsets.  Call
+       ENTER/LEAVE macros.
+       * sysdeps/i386/i586/mul_1.S: Likewise.
+       * sysdeps/i386/i586/submul_1.S: Likewise.
+
 2000-06-25  Greg McGary  <greg@mcgary.org>
 
        * sysdeps/i386/i586/memcpy.S: Redefine memcpy as mempcpy,
index 50151ea07d6b153fbfec1e6c31bca3bf97593051..a5d3fb0539bdf4ae321ffb50f1a2dd31ea5b722e 100644 (file)
 
        .text
 ENTRY(__mpn_addmul_1)
+       ENTER
 
-       INSN1(push,l    ,R(edi))
-       INSN1(push,l    ,R(esi))
-       INSN1(push,l    ,R(ebx))
-       INSN1(push,l    ,R(ebp))
+       pushl   %edi
+       pushl   %esi
+       pushl   %ebx
+       pushl   %ebp
 
-       INSN2(mov,l     ,R(res_ptr),MEM_DISP(esp,RES))
-       INSN2(mov,l     ,R(s1_ptr),MEM_DISP(esp,S1))
-       INSN2(mov,l     ,R(sizeP),MEM_DISP(esp,SIZE))
-       INSN2(mov,l     ,R(s2_limb),MEM_DISP(esp,S2LIMB))
+       movl    RES(%esp), %res_ptr
+       movl    S1(%esp), %s1_ptr
+       movl    SIZE(%esp), %sizeP
+       movl    S2LIMB(%esp), %s2_limb
 
-       INSN2(lea,l     ,R(res_ptr),MEM_INDEX(res_ptr,sizeP,4))
-       INSN2(lea,l     ,R(s1_ptr),MEM_INDEX(s1_ptr,sizeP,4))
-       INSN1(neg,l     ,R(sizeP))
-       INSN2(xor,l     ,R(ebx),R(ebx))
+       leal    (%res_ptr,%sizeP,4), %res_ptr
+       leal    (%s1_ptr,%sizeP,4), %s1_ptr
+       negl    %sizeP
+       xorl    %ebx, %ebx
        ALIGN (3)
 L(oop):
-       INSN2(mov,l     ,R(eax),MEM_INDEX(s1_ptr,sizeP,4))
-       INSN1(mul,l     ,R(s2_limb))
-       INSN2(add,l     ,R(eax),R(ebx))
-       INSN2(adc,l     ,R(edx),$0)
-       INSN2(add,l     ,MEM_INDEX(res_ptr,sizeP,4),R(eax))
-       INSN2(adc,l     ,R(edx),$0)
-       INSN2(mov,l     ,R(ebx),R(edx))
+       movl    (%s1_ptr,%sizeP,4), %eax
+       mull    %s2_limb
+       addl    %ebx, %eax
+       adcl    $0, %edx
+       addl    %eax, (%res_ptr,%sizeP,4)
+       adcl    $0, %edx
+       movl    %edx, %ebx
 
-       INSN1(inc,l     ,R(sizeP))
-       INSN1(jnz,      ,L(oop))
-       INSN2(mov,l     ,R(eax),R(ebx))
+       incl    %sizeP
+       jnz     L(oop)
+       movl    %ebx, %eax
 
-       INSN1(pop,l     ,R(ebp))
-       INSN1(pop,l     ,R(ebx))
-       INSN1(pop,l     ,R(esi))
-       INSN1(pop,l     ,R(edi))
+       popl    %ebp
+       popl    %ebx
+       popl    %esi
+       popl    %edi
+
+       LEAVE
        ret
 END(__mpn_addmul_1)
index 68c7b0e584852a6eb6cdd9906e6949601d361780..a534a9b0464cd73fd68e52d71dcbbe56bd58f2f1 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for x86 syntax variations.
-   Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.  Its master source is NOT part of
    the C library, however.  The master source lives in the GNU MP Library.
    Boston, MA 02111-1307, USA.  */
 
 #undef ALIGN
-
-#ifdef GAS_SYNTAX
-#define R(r) %r
-#define MEM(base)(base)
-#define MEM_DISP(base,displacement)displacement(R(base))
-#define MEM_INDEX(base,index,size)(R(base),R(index),size)
-#ifdef __STDC__
-#define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst
-#define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src,dst
+#if defined NOLOG_ALIGN || defined HAVE_ELF
+# define ALIGN(log) .align 1<<log
 #else
-#define INSN1(mnemonic,size_suffix,dst)mnemonic/**/size_suffix dst
-#define INSN2(mnemonic,size_suffix,dst,src)mnemonic/**/size_suffix src,dst
-#endif
-#define TEXT .text
-#define ALIGN(log) .align log
-#define GLOBL .globl
-#endif
-
-#ifdef INTEL_SYNTAX
-#define R(r) r
-#define MEM(base)[base]
-#define MEM_DISP(base,displacement)[base+(displacement)]
-#define MEM_INDEX(base,index,size)[base+index*size]
-#define INSN1(mnemonic,size_suffix,dst)mnemonic dst
-#define INSN2(mnemonic,size_suffix,dst,src)mnemonic dst,src
-#define TEXT .text
-#define ALIGN(log) .align log
-#define GLOBL .globl
-#endif
-
-#ifdef BROKEN_ALIGN
-#undef ALIGN
-#define ALIGN(log) .align log,0x90
-#endif
-
-#if !defined (NOLOG_ALIGN) && defined (HAVE_ELF)
-#define NOLOG_ALIGN
-#endif
-
-#ifdef NOLOG_ALIGN
-#undef ALIGN
-#define ALIGN(log) .align 1<<log
+# define ALIGN(log) .align log
 #endif
 
 #undef L
 #ifdef __ELF__
-#ifdef __STDC__
-#define L(body)        .L##body
+# ifdef __STDC__
+#  define L(body) .L##body
+# else
+#  define L(body) .L/**/body
+# endif
 #else
-#define L(body)        .L/**/body
-#endif
-#else
-#ifdef __STDC__
-#define L(body) L##body
-#else
-#define L(body) L/**/body
-#endif
+# ifdef __STDC__
+#  define L(body) L##body
+# else
+#  define L(body) L/**/body
+# endif
 #endif
index 76bf25f8178bb5f52e6c64ace81f2c3a2dfc4ece..bf5b718a9fa8bdb8f810cb8cdb951caa459b0116 100644 (file)
@@ -1,6 +1,6 @@
 /* Pentium __mpn_addmul_1 -- Multiply a limb vector with a limb and add
    the result to a second limb vector.
-   Copyright (C) 1992, 94, 96, 97, 98 Free Software Foundation, Inc.
+   Copyright (C) 1992, 94, 96, 97, 98, 00 Free Software Foundation, Inc.
    This file is part of the GNU MP Library.
 
    The GNU MP Library is free software; you can redistribute it and/or modify
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
    MA 02111-1307, USA. */
 
-/*
-   INPUT PARAMETERS
-   res_ptr     (sp + 4)
-   s1_ptr      (sp + 8)
-   size                (sp + 12)
-   s2_limb     (sp + 16)
-*/
-
 #include "sysdep.h"
 #include "asm-syntax.h"
+#include "bp-asm.h"
+
+#define PARMS  LINKAGE+16      /* space for 4 saved regs */
+#define RES    PARMS
+#define S1     RES+PTR_SIZE
+#define SIZE   S1+PTR_SIZE
+#define S2LIMB SIZE+4
 
 #define res_ptr edi
 #define s1_ptr esi
 
        .text
 ENTRY(__mpn_addmul_1)
-
-       INSN1(push,l    ,R(edi))
-       INSN1(push,l    ,R(esi))
-       INSN1(push,l    ,R(ebx))
-       INSN1(push,l    ,R(ebp))
-
-       INSN2(mov,l     ,R(res_ptr),MEM_DISP(esp,20))
-       INSN2(mov,l     ,R(s1_ptr),MEM_DISP(esp,24))
-       INSN2(mov,l     ,R(size),MEM_DISP(esp,28))
-       INSN2(mov,l     ,R(s2_limb),MEM_DISP(esp,32))
-
-       INSN2(lea,l     ,R(res_ptr),MEM_INDEX(res_ptr,size,4))
-       INSN2(lea,l     ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4))
-       INSN1(neg,l     ,R(size))
-       INSN2(xor,l     ,R(ebx),R(ebx))
+       ENTER
+
+       pushl   %edi
+       pushl   %esi
+       pushl   %ebx
+       pushl   %ebp
+
+       movl    RES(%esp), %res_ptr
+       movl    S1(%esp), %s1_ptr
+       movl    SIZE(%esp), %size
+       movl    S2LIMB(%esp), %s2_limb
+
+       leal    (%res_ptr,%size,4), %res_ptr
+       leal    (%s1_ptr,%size,4), %s1_ptr
+       negl    %size
+       xorl    %ebx, %ebx
        ALIGN (3)
 
-L(oop):        INSN2(adc,l     ,R(ebx),$0)
-       INSN2(mov,l     ,R(eax),MEM_INDEX(s1_ptr,size,4))
+L(oop):        adcl    $0, %ebx
+       movl    (%s1_ptr,%size,4), %eax
+
+       mull    %s2_limb
 
-       INSN1(mul,l     ,R(s2_limb))
+       addl    %ebx, %eax
+       movl    (%res_ptr,%size,4), %ebx
 
-       INSN2(add,l     ,R(eax),R(ebx))
-       INSN2(mov,l     ,R(ebx),MEM_INDEX(res_ptr,size,4))
+       adcl    $0, %edx
+       addl    %eax, %ebx
 
-       INSN2(adc,l     ,R(edx),$0)
-       INSN2(add,l     ,R(ebx),R(eax))
+       movl    %ebx, (%res_ptr,%size,4)
+       incl    %size
 
-       INSN2(mov,l     ,MEM_INDEX(res_ptr,size,4),R(ebx))
-       INSN1(inc,l     ,R(size))
+       movl    %edx, %ebx
+       jnz     L(oop)
 
-       INSN2(mov,l     ,R(ebx),R(edx))
-       INSN1(jnz,      ,L(oop))
+       adcl    $0, %ebx
+       movl    %ebx, %eax
+       popl    %ebp
+       popl    %ebx
+       popl    %esi
+       popl    %edi
 
-       INSN2(adc,l     ,R(ebx),$0)
-       INSN2(mov,l     ,R(eax),R(ebx))
-       INSN1(pop,l     ,R(ebp))
-       INSN1(pop,l     ,R(ebx))
-       INSN1(pop,l     ,R(esi))
-       INSN1(pop,l     ,R(edi))
+       LEAVE
        ret
 #undef size
 END(__mpn_addmul_1)
index e2f7f6ce6c6040a6cfc65fb8fe4e86a080b773cc..1910c66eabaeda8d5369a6ae70a9a3dd989ca1e1 100644 (file)
@@ -1,6 +1,6 @@
 /* Pentium __mpn_mul_1 -- Multiply a limb vector with a limb and store
    the result in a second limb vector.
-   Copyright (C) 1992, 94, 96, 97, 98 Free Software Foundation, Inc.
+   Copyright (C) 1992, 94, 96, 97, 98, 00 Free Software Foundation, Inc.
    This file is part of the GNU MP Library.
 
    The GNU MP Library is free software; you can redistribute it and/or modify
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
    MA 02111-1307, USA. */
 
-/*
-   INPUT PARAMETERS
-   res_ptr     (sp + 4)
-   s1_ptr      (sp + 8)
-   size                (sp + 12)
-   s2_limb     (sp + 16)
-*/
-
 #include "sysdep.h"
 #include "asm-syntax.h"
+#include "bp-asm.h"
+
+#define PARMS  LINKAGE+16      /* space for 4 saved regs */
+#define RES    PARMS
+#define S1     RES+PTR_SIZE
+#define SIZE   S1+PTR_SIZE
+#define S2LIMB SIZE+4
 
 #define res_ptr edi
 #define s1_ptr esi
 
        .text
 ENTRY(__mpn_mul_1)
-
-       INSN1(push,l    ,R(edi))
-       INSN1(push,l    ,R(esi))
-       INSN1(push,l    ,R(ebx))
-       INSN1(push,l    ,R(ebp))
-
-       INSN2(mov,l     ,R(res_ptr),MEM_DISP(esp,20))
-       INSN2(mov,l     ,R(s1_ptr),MEM_DISP(esp,24))
-       INSN2(mov,l     ,R(size),MEM_DISP(esp,28))
-       INSN2(mov,l     ,R(s2_limb),MEM_DISP(esp,32))
-
-       INSN2(lea,l     ,R(res_ptr),MEM_INDEX(res_ptr,size,4))
-       INSN2(lea,l     ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4))
-       INSN1(neg,l     ,R(size))
-       INSN2(xor,l     ,R(ebx),R(ebx))
+       ENTER
+
+       pushl   %edi
+       pushl   %esi
+       pushl   %ebx
+       pushl   %ebp
+
+       movl    RES(%esp), %res_ptr
+       movl    S1(%esp), %s1_ptr
+       movl    SIZE(%esp), %size
+       movl    S2LIMB(%esp), %s2_limb
+
+       leal    (%res_ptr,%size,4), %res_ptr
+       leal    (%s1_ptr,%size,4), %s1_ptr
+       negl    %size
+       xorl    %ebx, %ebx
        ALIGN (3)
 
-L(oop):        INSN2(adc,l     ,R(ebx),$0)
-       INSN2(mov,l     ,R(eax),MEM_INDEX(s1_ptr,size,4))
+L(oop):        adcl    $0, %ebx
+       movl    (%s1_ptr,%size,4), %eax
+
+       mull    %s2_limb
 
-       INSN1(mul,l     ,R(s2_limb))
+       addl    %eax, %ebx
 
-       INSN2(add,l     ,R(ebx),R(eax))
+       movl    %ebx, (%res_ptr,%size,4)
+       incl    %size
 
-       INSN2(mov,l     ,MEM_INDEX(res_ptr,size,4),R(ebx))
-       INSN1(inc,l     ,R(size))
+       movl    %edx, %ebx
+       jnz     L(oop)
 
-       INSN2(mov,l     ,R(ebx),R(edx))
-       INSN1(jnz,      ,L(oop))
+       adcl    $0, %ebx
+       movl    %ebx, %eax
+       popl    %ebp
+       popl    %ebx
+       popl    %esi
+       popl    %edi
 
-       INSN2(adc,l     ,R(ebx),$0)
-       INSN2(mov,l     ,R(eax),R(ebx))
-       INSN1(pop,l     ,R(ebp))
-       INSN1(pop,l     ,R(ebx))
-       INSN1(pop,l     ,R(esi))
-       INSN1(pop,l     ,R(edi))
+       LEAVE
        ret
 #undef size
 END(__mpn_mul_1)
index 905ad19d7fa40f6d70ddffa2adbcb67fe5f5e8af..4cb2b5da9232b1e6f5f0efc3781742b39d2c1652 100644 (file)
@@ -1,6 +1,6 @@
 /* Pentium __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
    the result from a second limb vector.
-   Copyright (C) 1992, 94, 96, 97, 98 Free Software Foundation, Inc.
+   Copyright (C) 1992, 94, 96, 97, 98, 00 Free Software Foundation, Inc.
    This file is part of the GNU MP Library.
 
    The GNU MP Library is free software; you can redistribute it and/or modify
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
    MA 02111-1307, USA. */
 
-/*
-   INPUT PARAMETERS
-   res_ptr     (sp + 4)
-   s1_ptr      (sp + 8)
-   size                (sp + 12)
-   s2_limb     (sp + 16)
-*/
-
 #include "sysdep.h"
 #include "asm-syntax.h"
+#include "bp-asm.h"
+
+#define PARMS  LINKAGE+16      /* space for 4 saved regs */
+#define RES    PARMS
+#define S1     RES+PTR_SIZE
+#define SIZE   S1+PTR_SIZE
+#define S2LIMB SIZE+4
 
 #define res_ptr edi
 #define s1_ptr esi
 
        .text
 ENTRY(__mpn_submul_1)
-
-       INSN1(push,l    ,R(edi))
-       INSN1(push,l    ,R(esi))
-       INSN1(push,l    ,R(ebx))
-       INSN1(push,l    ,R(ebp))
-
-       INSN2(mov,l     ,R(res_ptr),MEM_DISP(esp,20))
-       INSN2(mov,l     ,R(s1_ptr),MEM_DISP(esp,24))
-       INSN2(mov,l     ,R(size),MEM_DISP(esp,28))
-       INSN2(mov,l     ,R(s2_limb),MEM_DISP(esp,32))
-
-       INSN2(lea,l     ,R(res_ptr),MEM_INDEX(res_ptr,size,4))
-       INSN2(lea,l     ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4))
-       INSN1(neg,l     ,R(size))
-       INSN2(xor,l     ,R(ebx),R(ebx))
+       ENTER
+
+       pushl   %edi
+       pushl   %esi
+       pushl   %ebx
+       pushl   %ebp
+
+       movl    RES(%esp), %res_ptr
+       movl    S1(%esp), %s1_ptr
+       movl    SIZE(%esp), %size
+       movl    S2LIMB(%esp), %s2_limb
+
+       leal    (%res_ptr,%size,4), %res_ptr
+       leal    (%s1_ptr,%size,4), %s1_ptr
+       negl    %size
+       xorl    %ebx, %ebx
        ALIGN (3)
 
-L(oop):        INSN2(adc,l     ,R(ebx),$0)
-       INSN2(mov,l     ,R(eax),MEM_INDEX(s1_ptr,size,4))
+L(oop):        adcl    $0, %ebx
+       movl    (%s1_ptr,%size,4), %eax
+
+       mull    %s2_limb
 
-       INSN1(mul,l     ,R(s2_limb))
+       addl    %ebx, %eax
+       movl    (%res_ptr,%size,4), %ebx
 
-       INSN2(add,l     ,R(eax),R(ebx))
-       INSN2(mov,l     ,R(ebx),MEM_INDEX(res_ptr,size,4))
+       adcl    $0, %edx
+       subl    %eax, %ebx
 
-       INSN2(adc,l     ,R(edx),$0)
-       INSN2(sub,l     ,R(ebx),R(eax))
+       movl    %ebx, (%res_ptr,%size,4)
+       incl    %size
 
-       INSN2(mov,l     ,MEM_INDEX(res_ptr,size,4),R(ebx))
-       INSN1(inc,l     ,R(size))
+       movl    %edx, %ebx
+       jnz     L(oop)
 
-       INSN2(mov,l     ,R(ebx),R(edx))
-       INSN1(jnz,      ,L(oop))
+       adcl    $0, %ebx
+       movl    %ebx, %eax
+       popl    %ebp
+       popl    %ebx
+       popl    %esi
+       popl    %edi
 
-       INSN2(adc,l     ,R(ebx),$0)
-       INSN2(mov,l     ,R(eax),R(ebx))
-       INSN1(pop,l     ,R(ebp))
-       INSN1(pop,l     ,R(ebx))
-       INSN1(pop,l     ,R(esi))
-       INSN1(pop,l     ,R(edi))
+       LEAVE
        ret
 #undef size
 END(__mpn_submul_1)
index 9b125e7c7b2a419f464be780ad6ecd0b38f956a6..5abe97597a136a2f2418d06f4beb9d74eb9158e7 100644 (file)
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
    MA 02111-1307, USA. */
 
-/*
-   INPUT PARAMETERS
-   res_ptr     (sp + 4)
-   s1_ptr      (sp + 8)
-   size                (sp + 12)
-   s2_limb     (sp + 16)
-*/
-
 #include <sysdep.h>
 #include "asm-syntax.h"
 #include "bp-asm.h"
 ENTRY(__mpn_mul_1)
        ENTER
 
-       INSN1(push,l    ,R(edi))
-       INSN1(push,l    ,R(esi))
-       INSN1(push,l    ,R(ebx))
-       INSN1(push,l    ,R(ebp))
+       pushl   %edi
+       pushl   %esi
+       pushl   %ebx
+       pushl   %ebp
 
-       INSN2(mov,l     ,R(res_ptr),MEM_DISP(esp,RES))
-       INSN2(mov,l     ,R(s1_ptr),MEM_DISP(esp,S1))
-       INSN2(mov,l     ,R(size),MEM_DISP(esp,SIZE))
-       INSN2(mov,l     ,R(s2_limb),MEM_DISP(esp,S2LIMB))
+       movl    RES(%esp), %res_ptr
+       movl    S1(%esp), %s1_ptr
+       movl    SIZE(%esp), %size
+       movl    S2LIMB(%esp), %s2_limb
 
-       INSN2(lea,l     ,R(res_ptr),MEM_INDEX(res_ptr,size,4))
-       INSN2(lea,l     ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4))
-       INSN1(neg,l     ,R(size))
-       INSN2(xor,l     ,R(ebx),R(ebx))
+       leal    (%res_ptr,%size,4), %res_ptr
+       leal    (%s1_ptr,%size,4), %s1_ptr
+       negl    %size
+       xorl    %ebx, %ebx
        ALIGN (3)
 L(oop):
-       INSN2(mov,l     ,R(eax),MEM_INDEX(s1_ptr,size,4))
-       INSN1(mul,l     ,R(s2_limb))
-       INSN2(add,l     ,R(eax),R(ebx))
-       INSN2(mov,l     ,MEM_INDEX(res_ptr,size,4),R(eax))
-       INSN2(adc,l     ,R(edx),$0)
-       INSN2(mov,l     ,R(ebx),R(edx))
+       movl    (%s1_ptr,%size,4), %eax
+       mull    %s2_limb
+       addl    %ebx, %eax
+       movl    %eax, (%res_ptr,%size,4)
+       adcl    $0, %edx
+       movl    %edx, %ebx
 
-       INSN1(inc,l     ,R(size))
-       INSN1(jnz,      ,L(oop))
-       INSN2(mov,l     ,R(eax),R(ebx))
+       incl    %size
+       jnz     L(oop)
+       movl    %ebx, %eax
 
-       INSN1(pop,l     ,R(ebp))
-       INSN1(pop,l     ,R(ebx))
-       INSN1(pop,l     ,R(esi))
-       INSN1(pop,l     ,R(edi))
+       popl    %ebp
+       popl    %ebx
+       popl    %esi
+       popl    %edi
 
        LEAVE
        ret
index 99a1c81f2d10de5e0ef47ab89b860aeb2a32a269..8715aba7f4c29f5e123d782e0b373a5c7b4197e6 100644 (file)
 ENTRY(__mpn_submul_1)
        ENTER
 
-       INSN1(push,l    ,R(edi))
-       INSN1(push,l    ,R(esi))
-       INSN1(push,l    ,R(ebx))
-       INSN1(push,l    ,R(ebp))
+       pushl   %edi
+       pushl   %esi
+       pushl   %ebx
+       pushl   %ebp
 
-       INSN2(mov,l     ,R(res_ptr),MEM_DISP(esp,RES))
-       INSN2(mov,l     ,R(s1_ptr),MEM_DISP(esp,S1))
-       INSN2(mov,l     ,R(sizeP),MEM_DISP(esp,SIZE))
-       INSN2(mov,l     ,R(s2_limb),MEM_DISP(esp,S2LIMB))
+       movl    RES(%esp), %res_ptr
+       movl    S1(%esp), %s1_ptr
+       movl    SIZE(%esp), %sizeP
+       movl    S2LIMB(%esp), %s2_limb
 
-       INSN2(lea,l     ,R(res_ptr),MEM_INDEX(res_ptr,sizeP,4))
-       INSN2(lea,l     ,R(s1_ptr),MEM_INDEX(s1_ptr,sizeP,4))
-       INSN1(neg,l     ,R(sizeP))
-       INSN2(xor,l     ,R(ebx),R(ebx))
+       leal    (%res_ptr,%sizeP,4), %res_ptr
+       leal    (%s1_ptr,%sizeP,4), %s1_ptr
+       negl    %sizeP
+       xorl    %ebx, %ebx
        ALIGN (3)
 L(oop):
-       INSN2(mov,l     ,R(eax),MEM_INDEX(s1_ptr,sizeP,4))
-       INSN1(mul,l     ,R(s2_limb))
-       INSN2(add,l     ,R(eax),R(ebx))
-       INSN2(adc,l     ,R(edx),$0)
-       INSN2(sub,l     ,MEM_INDEX(res_ptr,sizeP,4),R(eax))
-       INSN2(adc,l     ,R(edx),$0)
-       INSN2(mov,l     ,R(ebx),R(edx))
+       movl    (%s1_ptr,%sizeP,4), %eax
+       mull    %s2_limb
+       addl    %ebx, %eax
+       adcl    $0, %edx
+       subl    %eax, (%res_ptr,%sizeP,4)
+       adcl    $0, %edx
+       movl    %edx, %ebx
 
-       INSN1(inc,l     ,R(sizeP))
-       INSN1(jnz,      ,L(oop))
-       INSN2(mov,l     ,R(eax),R(ebx))
+       incl    %sizeP
+       jnz     L(oop)
+       movl    %ebx, %eax
 
-       INSN1(pop,l     ,R(ebp))
-       INSN1(pop,l     ,R(ebx))
-       INSN1(pop,l     ,R(esi))
-       INSN1(pop,l     ,R(edi))
+       popl    %ebp
+       popl    %ebx
+       popl    %esi
+       popl    %edi
 
        LEAVE
        ret
This page took 0.073529 seconds and 5 git commands to generate.