[project @ 1998-06-05 14:37:58 by simonm]
authorsimonm <unknown>
Fri, 5 Jun 1998 14:37:58 +0000 (14:37 +0000)
committersimonm <unknown>
Fri, 5 Jun 1998 14:37:58 +0000 (14:37 +0000)
Initial revision

ghc/rts/gmp/mpn/x86/pentium/add_n.S [new file with mode: 0644]
ghc/rts/gmp/mpn/x86/pentium/addmul_1.S [new file with mode: 0644]
ghc/rts/gmp/mpn/x86/pentium/lshift.S [new file with mode: 0644]
ghc/rts/gmp/mpn/x86/pentium/mul_1.S [new file with mode: 0644]
ghc/rts/gmp/mpn/x86/pentium/rshift.S [new file with mode: 0644]
ghc/rts/gmp/mpn/x86/pentium/sub_n.S [new file with mode: 0644]
ghc/rts/gmp/mpn/x86/pentium/submul_1.S [new file with mode: 0644]
ghc/rts/gmp/mpn/x86/submul_1.S [new file with mode: 0644]
ghc/rts/gmp/mpn/x86/syntax.h [new file with mode: 0644]
ghc/rts/gmp/mpz/Makefile.in [new file with mode: 0644]

diff --git a/ghc/rts/gmp/mpn/x86/pentium/add_n.S b/ghc/rts/gmp/mpn/x86/pentium/add_n.S
new file mode 100644 (file)
index 0000000..ac6f281
--- /dev/null
@@ -0,0 +1,130 @@
+/* Pentium __mpn_add_n -- Add two limb vectors of the same length > 0 and store
+   sum in a third limb vector.
+
+Copyright (C) 1992, 1994, 1995, 1996 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
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
+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)
+   s2_ptr      (sp + 12)
+   size                (sp + 16)
+*/
+
+#include "sysdep.h"
+#include "asm-syntax.h"
+
+.text
+       ALIGN (3)
+       .globl C_SYMBOL_NAME(__mpn_add_n)
+C_SYMBOL_NAME(__mpn_add_n:)
+       pushl   %edi
+       pushl   %esi
+       pushl   %ebx
+       pushl   %ebp
+
+       movl    20(%esp),%edi           /* res_ptr */
+       movl    24(%esp),%esi           /* s1_ptr */
+       movl    28(%esp),%ebp           /* s2_ptr */
+       movl    32(%esp),%ecx           /* size */
+
+       movl    (%ebp),%ebx
+
+       decl    %ecx
+       movl    %ecx,%edx
+       shrl    $3,%ecx
+       andl    $7,%edx
+       testl   %ecx,%ecx               /* zero carry flag */
+       jz      Lend
+       pushl   %edx
+
+       ALIGN (3)
+Loop:  movl    28(%edi),%eax           /* fetch destination cache line */
+       leal    32(%edi),%edi
+
+L1:    movl    (%esi),%eax
+       movl    4(%esi),%edx
+       adcl    %ebx,%eax
+       movl    4(%ebp),%ebx
+       adcl    %ebx,%edx
+       movl    8(%ebp),%ebx
+       movl    %eax,-32(%edi)
+       movl    %edx,-28(%edi)
+
+L2:    movl    8(%esi),%eax
+       movl    12(%esi),%edx
+       adcl    %ebx,%eax
+       movl    12(%ebp),%ebx
+       adcl    %ebx,%edx
+       movl    16(%ebp),%ebx
+       movl    %eax,-24(%edi)
+       movl    %edx,-20(%edi)
+
+L3:    movl    16(%esi),%eax
+       movl    20(%esi),%edx
+       adcl    %ebx,%eax
+       movl    20(%ebp),%ebx
+       adcl    %ebx,%edx
+       movl    24(%ebp),%ebx
+       movl    %eax,-16(%edi)
+       movl    %edx,-12(%edi)
+
+L4:    movl    24(%esi),%eax
+       movl    28(%esi),%edx
+       adcl    %ebx,%eax
+       movl    28(%ebp),%ebx
+       adcl    %ebx,%edx
+       movl    32(%ebp),%ebx
+       movl    %eax,-8(%edi)
+       movl    %edx,-4(%edi)
+
+       leal    32(%esi),%esi
+       leal    32(%ebp),%ebp
+       decl    %ecx
+       jnz     Loop
+
+       popl    %edx
+Lend:
+       decl    %edx                    /* test %edx w/o clobbering carry */
+       js      Lend2
+       incl    %edx
+Loop2:
+       leal    4(%edi),%edi
+       movl    (%esi),%eax
+       adcl    %ebx,%eax
+       movl    4(%ebp),%ebx
+       movl    %eax,-4(%edi)
+       leal    4(%esi),%esi
+       leal    4(%ebp),%ebp
+       decl    %edx
+       jnz     Loop2
+Lend2:
+       movl    (%esi),%eax
+       adcl    %ebx,%eax
+       movl    %eax,(%edi)
+
+       sbbl    %eax,%eax
+       negl    %eax
+
+       popl    %ebp
+       popl    %ebx
+       popl    %esi
+       popl    %edi
+       ret
diff --git a/ghc/rts/gmp/mpn/x86/pentium/addmul_1.S b/ghc/rts/gmp/mpn/x86/pentium/addmul_1.S
new file mode 100644 (file)
index 0000000..7cfa5db
--- /dev/null
@@ -0,0 +1,83 @@
+/* Pentium __mpn_addmul_1 -- Multiply a limb vector with a limb and add
+   the result to a second limb vector.
+
+Copyright (C) 1992, 1994, 1996 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
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
+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"
+
+#define res_ptr edi
+#define s1_ptr esi
+#define size ecx
+#define s2_limb ebp
+
+       TEXT
+       ALIGN (3)
+       GLOBL   C_SYMBOL_NAME(__mpn_addmul_1)
+C_SYMBOL_NAME(__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))
+       ALIGN (3)
+
+Loop:  INSN2(adc,l     ,R(ebx),$0)
+       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     ,R(ebx),MEM_INDEX(res_ptr,size,4))
+
+       INSN2(adc,l     ,R(edx),$0)
+       INSN2(add,l     ,R(ebx),R(eax))
+
+       INSN2(mov,l     ,MEM_INDEX(res_ptr,size,4),R(ebx))
+       INSN1(inc,l     ,R(size))
+
+       INSN2(mov,l     ,R(ebx),R(edx))
+       INSN1(jnz,      ,Loop)
+
+       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))
+       ret
diff --git a/ghc/rts/gmp/mpn/x86/pentium/lshift.S b/ghc/rts/gmp/mpn/x86/pentium/lshift.S
new file mode 100644 (file)
index 0000000..b298983
--- /dev/null
@@ -0,0 +1,217 @@
+/* Pentium optimized __mpn_lshift -- 
+
+Copyright (C) 1992, 1994, 1995 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
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+/*
+  INPUT PARAMETERS
+  res_ptr      (sp + 4)
+  s_ptr                (sp + 8)
+  size         (sp + 12)
+  cnt          (sp + 16)
+*/
+
+#include "sysdep.h"
+#include "asm-syntax.h"
+
+.text
+       ALIGN (3)
+       .globl C_SYMBOL_NAME(__mpn_lshift)
+C_SYMBOL_NAME(__mpn_lshift:)
+       pushl   %edi
+       pushl   %esi
+       pushl   %ebx
+       pushl   %ebp
+
+       movl    20(%esp),%edi           /* res_ptr */
+       movl    24(%esp),%esi           /* s_ptr */
+       movl    28(%esp),%ebp           /* size */
+       movl    32(%esp),%ecx           /* cnt */
+
+/* We can use faster code for shift-by-1 under certain conditions.  */
+       cmp     $1,%ecx
+       jne     Lnormal
+       leal    4(%esi),%eax
+       cmpl    %edi,%eax
+       jnc     Lspecial                /* jump if s_ptr + 1 >= res_ptr */
+       leal    (%esi,%ebp,4),%eax
+       cmpl    %eax,%edi
+       jnc     Lspecial                /* jump if res_ptr >= s_ptr + size */
+
+Lnormal:
+       leal    -4(%edi,%ebp,4),%edi
+       leal    -4(%esi,%ebp,4),%esi
+
+       movl    (%esi),%edx
+       subl    $4,%esi
+       xorl    %eax,%eax
+       shldl   %cl,%edx,%eax           /* compute carry limb */
+       pushl   %eax                    /* push carry limb onto stack */
+
+       decl    %ebp
+       pushl   %ebp
+       shrl    $3,%ebp
+       jz      Lend
+
+       movl    (%edi),%eax             /* fetch destination cache line */
+
+       ALIGN   (2)
+Loop:  movl    -28(%edi),%eax          /* fetch destination cache line */
+       movl    %edx,%ebx
+
+       movl    (%esi),%eax
+       movl    -4(%esi),%edx
+       shldl   %cl,%eax,%ebx
+       shldl   %cl,%edx,%eax
+       movl    %ebx,(%edi)
+       movl    %eax,-4(%edi)
+
+       movl    -8(%esi),%ebx
+       movl    -12(%esi),%eax
+       shldl   %cl,%ebx,%edx
+       shldl   %cl,%eax,%ebx
+       movl    %edx,-8(%edi)
+       movl    %ebx,-12(%edi)
+
+       movl    -16(%esi),%edx
+       movl    -20(%esi),%ebx
+       shldl   %cl,%edx,%eax
+       shldl   %cl,%ebx,%edx
+       movl    %eax,-16(%edi)
+       movl    %edx,-20(%edi)
+
+       movl    -24(%esi),%eax
+       movl    -28(%esi),%edx
+       shldl   %cl,%eax,%ebx
+       shldl   %cl,%edx,%eax
+       movl    %ebx,-24(%edi)
+       movl    %eax,-28(%edi)
+
+       subl    $32,%esi
+       subl    $32,%edi
+       decl    %ebp
+       jnz     Loop
+
+Lend:  popl    %ebp
+       andl    $7,%ebp
+       jz      Lend2
+Loop2: movl    (%esi),%eax
+       shldl   %cl,%eax,%edx
+       movl    %edx,(%edi)
+       movl    %eax,%edx
+       subl    $4,%esi
+       subl    $4,%edi
+       decl    %ebp
+       jnz     Loop2
+
+Lend2: shll    %cl,%edx                /* compute least significant limb */
+       movl    %edx,(%edi)             /* store it */
+
+       popl    %eax                    /* pop carry limb */
+
+       popl    %ebp
+       popl    %ebx
+       popl    %esi
+       popl    %edi
+       ret
+
+/* We loop from least significant end of the arrays, which is only
+   permissable if the source and destination don't overlap, since the
+   function is documented to work for overlapping source and destination.
+*/
+
+Lspecial:
+       movl    (%esi),%edx
+       addl    $4,%esi
+
+       decl    %ebp
+       pushl   %ebp
+       shrl    $3,%ebp
+
+       addl    %edx,%edx
+       incl    %ebp
+       decl    %ebp
+       jz      LLend
+
+       movl    (%edi),%eax             /* fetch destination cache line */
+
+       ALIGN   (2)
+LLoop: movl    28(%edi),%eax           /* fetch destination cache line */
+       movl    %edx,%ebx
+
+       movl    (%esi),%eax
+       movl    4(%esi),%edx
+       adcl    %eax,%eax
+       movl    %ebx,(%edi)
+       adcl    %edx,%edx
+       movl    %eax,4(%edi)
+
+       movl    8(%esi),%ebx
+       movl    12(%esi),%eax
+       adcl    %ebx,%ebx
+       movl    %edx,8(%edi)
+       adcl    %eax,%eax
+       movl    %ebx,12(%edi)
+
+       movl    16(%esi),%edx
+       movl    20(%esi),%ebx
+       adcl    %edx,%edx
+       movl    %eax,16(%edi)
+       adcl    %ebx,%ebx
+       movl    %edx,20(%edi)
+
+       movl    24(%esi),%eax
+       movl    28(%esi),%edx
+       adcl    %eax,%eax
+       movl    %ebx,24(%edi)
+       adcl    %edx,%edx
+       movl    %eax,28(%edi)
+
+       leal    32(%esi),%esi           /* use leal not to clobber carry */
+       leal    32(%edi),%edi
+       decl    %ebp
+       jnz     LLoop
+
+LLend: popl    %ebp
+       sbbl    %eax,%eax               /* save carry in %eax */
+       andl    $7,%ebp
+       jz      LLend2
+       addl    %eax,%eax               /* restore carry from eax */
+LLoop2:        movl    %edx,%ebx
+       movl    (%esi),%edx
+       adcl    %edx,%edx
+       movl    %ebx,(%edi)
+
+       leal    4(%esi),%esi            /* use leal not to clobber carry */
+       leal    4(%edi),%edi
+       decl    %ebp
+       jnz     LLoop2
+
+       jmp     LL1
+LLend2:        addl    %eax,%eax               /* restore carry from eax */
+LL1:   movl    %edx,(%edi)             /* store last limb */
+
+       sbbl    %eax,%eax
+       negl    %eax
+
+       popl    %ebp
+       popl    %ebx
+       popl    %esi
+       popl    %edi
+       ret
diff --git a/ghc/rts/gmp/mpn/x86/pentium/mul_1.S b/ghc/rts/gmp/mpn/x86/pentium/mul_1.S
new file mode 100644 (file)
index 0000000..4ac3050
--- /dev/null
@@ -0,0 +1,79 @@
+/* Pentium __mpn_mul_1 -- Multiply a limb vector with a limb and store
+   the result in a second limb vector.
+
+Copyright (C) 1992, 1994, 1996 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
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
+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"
+
+#define res_ptr edi
+#define s1_ptr esi
+#define size ecx
+#define s2_limb ebp
+
+       TEXT
+       ALIGN (3)
+       GLOBL   C_SYMBOL_NAME(__mpn_mul_1)
+C_SYMBOL_NAME(__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))
+       ALIGN (3)
+
+Loop:  INSN2(adc,l     ,R(ebx),$0)
+       INSN2(mov,l     ,R(eax),MEM_INDEX(s1_ptr,size,4))
+
+       INSN1(mul,l     ,R(s2_limb))
+
+       INSN2(add,l     ,R(ebx),R(eax))
+
+       INSN2(mov,l     ,MEM_INDEX(res_ptr,size,4),R(ebx))
+       INSN1(inc,l     ,R(size))
+
+       INSN2(mov,l     ,R(ebx),R(edx))
+       INSN1(jnz,      ,Loop)
+
+       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))
+       ret
diff --git a/ghc/rts/gmp/mpn/x86/pentium/rshift.S b/ghc/rts/gmp/mpn/x86/pentium/rshift.S
new file mode 100644 (file)
index 0000000..38398ed
--- /dev/null
@@ -0,0 +1,217 @@
+/* Pentium optimized __mpn_rshift -- 
+
+Copyright (C) 1992, 1994, 1995 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
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+/*
+  INPUT PARAMETERS
+  res_ptr      (sp + 4)
+  s_ptr                (sp + 8)
+  size         (sp + 12)
+  cnt          (sp + 16)
+*/
+
+#include "sysdep.h"
+#include "asm-syntax.h"
+
+.text
+       ALIGN (3)
+       .globl C_SYMBOL_NAME(__mpn_rshift)
+C_SYMBOL_NAME(__mpn_rshift:)
+       pushl   %edi
+       pushl   %esi
+       pushl   %ebx
+       pushl   %ebp
+
+       movl    20(%esp),%edi           /* res_ptr */
+       movl    24(%esp),%esi           /* s_ptr */
+       movl    28(%esp),%ebp           /* size */
+       movl    32(%esp),%ecx           /* cnt */
+
+/* We can use faster code for shift-by-1 under certain conditions.  */
+       cmp     $1,%ecx
+       jne     Lnormal
+       leal    4(%edi),%eax
+       cmpl    %esi,%eax
+       jnc     Lspecial                /* jump if res_ptr + 1 >= s_ptr */
+       leal    (%edi,%ebp,4),%eax
+       cmpl    %eax,%esi
+       jnc     Lspecial                /* jump if s_ptr >= res_ptr + size */
+
+Lnormal:
+       movl    (%esi),%edx
+       addl    $4,%esi
+       xorl    %eax,%eax
+       shrdl   %cl,%edx,%eax           /* compute carry limb */
+       pushl   %eax                    /* push carry limb onto stack */
+
+       decl    %ebp
+       pushl   %ebp
+       shrl    $3,%ebp
+       jz      Lend
+
+       movl    (%edi),%eax             /* fetch destination cache line */
+
+       ALIGN   (2)
+Loop:  movl    28(%edi),%eax           /* fetch destination cache line */
+       movl    %edx,%ebx
+
+       movl    (%esi),%eax
+       movl    4(%esi),%edx
+       shrdl   %cl,%eax,%ebx
+       shrdl   %cl,%edx,%eax
+       movl    %ebx,(%edi)
+       movl    %eax,4(%edi)
+
+       movl    8(%esi),%ebx
+       movl    12(%esi),%eax
+       shrdl   %cl,%ebx,%edx
+       shrdl   %cl,%eax,%ebx
+       movl    %edx,8(%edi)
+       movl    %ebx,12(%edi)
+
+       movl    16(%esi),%edx
+       movl    20(%esi),%ebx
+       shrdl   %cl,%edx,%eax
+       shrdl   %cl,%ebx,%edx
+       movl    %eax,16(%edi)
+       movl    %edx,20(%edi)
+
+       movl    24(%esi),%eax
+       movl    28(%esi),%edx
+       shrdl   %cl,%eax,%ebx
+       shrdl   %cl,%edx,%eax
+       movl    %ebx,24(%edi)
+       movl    %eax,28(%edi)
+
+       addl    $32,%esi
+       addl    $32,%edi
+       decl    %ebp
+       jnz     Loop
+
+Lend:  popl    %ebp
+       andl    $7,%ebp
+       jz      Lend2
+Loop2: movl    (%esi),%eax
+       shrdl   %cl,%eax,%edx           /* compute result limb */
+       movl    %edx,(%edi)
+       movl    %eax,%edx
+       addl    $4,%esi
+       addl    $4,%edi
+       decl    %ebp
+       jnz     Loop2
+
+Lend2: shrl    %cl,%edx                /* compute most significant limb */
+       movl    %edx,(%edi)             /* store it */
+
+       popl    %eax                    /* pop carry limb */
+
+       popl    %ebp
+       popl    %ebx
+       popl    %esi
+       popl    %edi
+       ret
+
+/* We loop from least significant end of the arrays, which is only
+   permissable if the source and destination don't overlap, since the
+   function is documented to work for overlapping source and destination.
+*/
+
+Lspecial:
+       leal    -4(%edi,%ebp,4),%edi
+       leal    -4(%esi,%ebp,4),%esi
+
+       movl    (%esi),%edx
+       subl    $4,%esi
+
+       decl    %ebp
+       pushl   %ebp
+       shrl    $3,%ebp
+
+       shrl    $1,%edx
+       incl    %ebp
+       decl    %ebp
+       jz      LLend
+
+       movl    (%edi),%eax             /* fetch destination cache line */
+
+       ALIGN   (2)
+LLoop: movl    -28(%edi),%eax          /* fetch destination cache line */
+       movl    %edx,%ebx
+
+       movl    (%esi),%eax
+       movl    -4(%esi),%edx
+       rcrl    $1,%eax
+       movl    %ebx,(%edi)
+       rcrl    $1,%edx
+       movl    %eax,-4(%edi)
+
+       movl    -8(%esi),%ebx
+       movl    -12(%esi),%eax
+       rcrl    $1,%ebx
+       movl    %edx,-8(%edi)
+       rcrl    $1,%eax
+       movl    %ebx,-12(%edi)
+
+       movl    -16(%esi),%edx
+       movl    -20(%esi),%ebx
+       rcrl    $1,%edx
+       movl    %eax,-16(%edi)
+       rcrl    $1,%ebx
+       movl    %edx,-20(%edi)
+
+       movl    -24(%esi),%eax
+       movl    -28(%esi),%edx
+       rcrl    $1,%eax
+       movl    %ebx,-24(%edi)
+       rcrl    $1,%edx
+       movl    %eax,-28(%edi)
+
+       leal    -32(%esi),%esi          /* use leal not to clobber carry */
+       leal    -32(%edi),%edi
+       decl    %ebp
+       jnz     LLoop
+
+LLend: popl    %ebp
+       sbbl    %eax,%eax               /* save carry in %eax */
+       andl    $7,%ebp
+       jz      LLend2
+       addl    %eax,%eax               /* restore carry from eax */
+LLoop2:        movl    %edx,%ebx
+       movl    (%esi),%edx
+       rcrl    $1,%edx
+       movl    %ebx,(%edi)
+
+       leal    -4(%esi),%esi           /* use leal not to clobber carry */
+       leal    -4(%edi),%edi
+       decl    %ebp
+       jnz     LLoop2
+
+       jmp     LL1
+LLend2:        addl    %eax,%eax               /* restore carry from eax */
+LL1:   movl    %edx,(%edi)             /* store last limb */
+
+       movl    $0,%eax
+       rcrl    $1,%eax
+
+       popl    %ebp
+       popl    %ebx
+       popl    %esi
+       popl    %edi
+       ret
diff --git a/ghc/rts/gmp/mpn/x86/pentium/sub_n.S b/ghc/rts/gmp/mpn/x86/pentium/sub_n.S
new file mode 100644 (file)
index 0000000..d1a2bc0
--- /dev/null
@@ -0,0 +1,130 @@
+/* Pentium __mpn_sub_n -- Subtract two limb vectors of the same length > 0
+   and store difference in a third limb vector.
+
+Copyright (C) 1992, 1994, 1995, 1996 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
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
+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)
+   s2_ptr      (sp + 12)
+   size                (sp + 16)
+*/
+
+#include "sysdep.h"
+#include "asm-syntax.h"
+
+.text
+       ALIGN (3)
+       .globl C_SYMBOL_NAME(__mpn_sub_n)
+C_SYMBOL_NAME(__mpn_sub_n:)
+       pushl   %edi
+       pushl   %esi
+       pushl   %ebx
+       pushl   %ebp
+
+       movl    20(%esp),%edi           /* res_ptr */
+       movl    24(%esp),%esi           /* s1_ptr */
+       movl    28(%esp),%ebp           /* s2_ptr */
+       movl    32(%esp),%ecx           /* size */
+
+       movl    (%ebp),%ebx
+
+       decl    %ecx
+       movl    %ecx,%edx
+       shrl    $3,%ecx
+       andl    $7,%edx
+       testl   %ecx,%ecx               /* zero carry flag */
+       jz      Lend
+       pushl   %edx
+
+       ALIGN (3)
+Loop:  movl    28(%edi),%eax           /* fetch destination cache line */
+       leal    32(%edi),%edi
+
+L1:    movl    (%esi),%eax
+       movl    4(%esi),%edx
+       sbbl    %ebx,%eax
+       movl    4(%ebp),%ebx
+       sbbl    %ebx,%edx
+       movl    8(%ebp),%ebx
+       movl    %eax,-32(%edi)
+       movl    %edx,-28(%edi)
+
+L2:    movl    8(%esi),%eax
+       movl    12(%esi),%edx
+       sbbl    %ebx,%eax
+       movl    12(%ebp),%ebx
+       sbbl    %ebx,%edx
+       movl    16(%ebp),%ebx
+       movl    %eax,-24(%edi)
+       movl    %edx,-20(%edi)
+
+L3:    movl    16(%esi),%eax
+       movl    20(%esi),%edx
+       sbbl    %ebx,%eax
+       movl    20(%ebp),%ebx
+       sbbl    %ebx,%edx
+       movl    24(%ebp),%ebx
+       movl    %eax,-16(%edi)
+       movl    %edx,-12(%edi)
+
+L4:    movl    24(%esi),%eax
+       movl    28(%esi),%edx
+       sbbl    %ebx,%eax
+       movl    28(%ebp),%ebx
+       sbbl    %ebx,%edx
+       movl    32(%ebp),%ebx
+       movl    %eax,-8(%edi)
+       movl    %edx,-4(%edi)
+
+       leal    32(%esi),%esi
+       leal    32(%ebp),%ebp
+       decl    %ecx
+       jnz     Loop
+
+       popl    %edx
+Lend:
+       decl    %edx                    /* test %edx w/o clobbering carry */
+       js      Lend2
+       incl    %edx
+Loop2:
+       leal    4(%edi),%edi
+       movl    (%esi),%eax
+       sbbl    %ebx,%eax
+       movl    4(%ebp),%ebx
+       movl    %eax,-4(%edi)
+       leal    4(%esi),%esi
+       leal    4(%ebp),%ebp
+       decl    %edx
+       jnz     Loop2
+Lend2:
+       movl    (%esi),%eax
+       sbbl    %ebx,%eax
+       movl    %eax,(%edi)
+
+       sbbl    %eax,%eax
+       negl    %eax
+
+       popl    %ebp
+       popl    %ebx
+       popl    %esi
+       popl    %edi
+       ret
diff --git a/ghc/rts/gmp/mpn/x86/pentium/submul_1.S b/ghc/rts/gmp/mpn/x86/pentium/submul_1.S
new file mode 100644 (file)
index 0000000..adf2d63
--- /dev/null
@@ -0,0 +1,83 @@
+/* Pentium __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
+   the result from a second limb vector.
+
+Copyright (C) 1992, 1994, 1996 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
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
+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"
+
+#define res_ptr edi
+#define s1_ptr esi
+#define size ecx
+#define s2_limb ebp
+
+       TEXT
+       ALIGN (3)
+       GLOBL   C_SYMBOL_NAME(__mpn_submul_1)
+C_SYMBOL_NAME(__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))
+       ALIGN (3)
+
+Loop:  INSN2(adc,l     ,R(ebx),$0)
+       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     ,R(ebx),MEM_INDEX(res_ptr,size,4))
+
+       INSN2(adc,l     ,R(edx),$0)
+       INSN2(sub,l     ,R(ebx),R(eax))
+
+       INSN2(mov,l     ,MEM_INDEX(res_ptr,size,4),R(ebx))
+       INSN1(inc,l     ,R(size))
+
+       INSN2(mov,l     ,R(ebx),R(edx))
+       INSN1(jnz,      ,Loop)
+
+       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))
+       ret
diff --git a/ghc/rts/gmp/mpn/x86/submul_1.S b/ghc/rts/gmp/mpn/x86/submul_1.S
new file mode 100644 (file)
index 0000000..730e732
--- /dev/null
@@ -0,0 +1,76 @@
+/* i80386 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
+   the result from a second limb vector.
+
+Copyright (C) 1992, 1994 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
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
+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"
+
+#define res_ptr edi
+#define s1_ptr esi
+#define size ecx
+#define s2_limb ebp
+
+       TEXT
+       ALIGN (3)
+       GLOBL   C_SYMBOL_NAME(__mpn_submul_1)
+C_SYMBOL_NAME(__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))
+       ALIGN (3)
+Loop:
+       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(adc,l     ,R(edx),$0)
+       INSN2(sub,l     ,MEM_INDEX(res_ptr,size,4),R(eax))
+       INSN2(adc,l     ,R(edx),$0)
+       INSN2(mov,l     ,R(ebx),R(edx))
+
+       INSN1(inc,l     ,R(size))
+       INSN1(jnz,      ,Loop)
+       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))
+       ret
diff --git a/ghc/rts/gmp/mpn/x86/syntax.h b/ghc/rts/gmp/mpn/x86/syntax.h
new file mode 100644 (file)
index 0000000..c53c73c
--- /dev/null
@@ -0,0 +1,62 @@
+/* asm.h -- Definitions for x86 syntax variations.
+
+Copyright (C) 1992, 1994, 1995 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
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA.  */
+
+
+#undef ALIGN
+
+#if defined (BSD_SYNTAX) || defined (ELF_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
+#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
+#if defined (BSD_SYNTAX)
+#define ALIGN(log) .align log
+#endif
+#if defined (ELF_SYNTAX)
+#define ALIGN(log) .align 1<<(log)
+#endif
+#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
diff --git a/ghc/rts/gmp/mpz/Makefile.in b/ghc/rts/gmp/mpz/Makefile.in
new file mode 100644 (file)
index 0000000..497f09c
--- /dev/null
@@ -0,0 +1,180 @@
+# Makefile for GNU MP/mpz functions
+# Copyright (C) 1991, 1993, 1994, 1996 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
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
+
+srcdir = .
+
+CC = gcc
+
+# If you cross compile on a machine with the same sizes of the integral
+# types ("int", "long int", "short int", and "char") define this as the
+# local compiler.  Otherwise, you need to look for the uses of LOCAL_CC below,
+# and handle those cases manually.
+LOCAL_CC = $(CC)
+CFLAGS = -g -O
+AR = ar
+AR_FLAGS = rc
+SHELL = /bin/sh
+
+#### host and target specific makefile fragments come in here.
+###
+
+MPZ_SRCS = init.c set.c set_ui.c set_si.c set_str.c set_d.c set_f.c set_q.c \
+  iset.c iset_ui.c iset_si.c iset_str.c iset_d.c clear.c \
+  get_ui.c get_si.c get_str.c get_d.c size.c sizeinbase.c \
+  add.c add_ui.c sub.c sub_ui.c mul.c mul_ui.c \
+  gcd.c gcd_ui.c gcdext.c sqrt.c sqrtrem.c powm.c powm_ui.c \
+  cmp.c cmp_ui.c cmp_si.c mul_2exp.c fdiv_q_2exp.c fdiv_r_2exp.c \
+  tdiv_q_2exp.c tdiv_r_2exp.c abs.c neg.c com.c and.c ior.c \
+  inp_raw.c inp_str.c out_raw.c out_str.c \
+  perfsqr.c random.c random2.c pow_ui.c ui_pow_ui.c setbit.c \
+  clrbit.c fac_ui.c pprime_p.c realloc.c getlimbn.c popcount.c hamdist.c \
+  cdiv_qr.c cdiv_q.c cdiv_r.c cdiv_qr_ui.c cdiv_q_ui.c cdiv_r_ui.c cdiv_ui.c \
+  fdiv_qr.c fdiv_q.c fdiv_r.c fdiv_qr_ui.c fdiv_q_ui.c fdiv_r_ui.c fdiv_ui.c \
+  tdiv_qr.c tdiv_q.c tdiv_r.c tdiv_qr_ui.c tdiv_q_ui.c tdiv_r_ui.c \
+  mod.c divexact.c array_init.c scan0.c scan1.c \
+  jacobi.c legendre.c invert.c
+MPZ_OBJS = init.o set.o set_ui.o set_si.o set_str.o set_d.o set_f.o set_q.o \
+  iset.o iset_ui.o iset_si.o iset_str.o iset_d.o clear.o \
+  get_ui.o get_si.o get_str.o get_d.o size.o sizeinbase.o \
+  add.o add_ui.o sub.o sub_ui.o mul.o mul_ui.o \
+  gcd.o gcd_ui.o gcdext.o sqrt.o sqrtrem.o powm.o powm_ui.o \
+  cmp.o cmp_ui.o cmp_si.o mul_2exp.o fdiv_q_2exp.o fdiv_r_2exp.o \
+  tdiv_q_2exp.o tdiv_r_2exp.o abs.o neg.o com.o and.o ior.o \
+  inp_raw.o inp_str.o out_raw.o out_str.o \
+  perfsqr.o random.o random2.o pow_ui.o ui_pow_ui.o setbit.o \
+  clrbit.o fac_ui.o pprime_p.o realloc.o getlimbn.o popcount.o hamdist.o \
+  cdiv_qr.o cdiv_q.o cdiv_r.o cdiv_qr_ui.o cdiv_q_ui.o cdiv_r_ui.o cdiv_ui.o \
+  fdiv_qr.o fdiv_q.o fdiv_r.o fdiv_qr_ui.o fdiv_q_ui.o fdiv_r_ui.o fdiv_ui.o \
+  tdiv_qr.o tdiv_q.o tdiv_r.o tdiv_qr_ui.o tdiv_q_ui.o tdiv_r_ui.o \
+  mod.o divexact.o array_init.o scan0.o scan1.o \
+  jacobi.o legendre.o invert.o
+
+INCLUDES = -I. -I.. -I../mpn -I$(srcdir)/..
+
+libmpz.a: Makefile $(MPZ_OBJS)
+       rm -f $@
+       $(AR) $(AR_FLAGS) $@ $(MPZ_OBJS)
+
+.c.o:
+       $(CC) -c $(INCLUDES) $(CFLAGS) $(XCFLAGS) $<
+
+clean mostlyclean:
+       rm -f *.o libmpz.a
+       -cd tests; $(MAKE) $@
+distclean maintainer-clean: clean
+       rm -f Makefile config.status
+       -cd tests; $(MAKE) $@
+
+Makefile: $(srcdir)/Makefile.in
+       $(SHELL) ./config.status
+
+H = $(srcdir)/../gmp.h $(srcdir)/../gmp-impl.h ../mpn/gmp-mparam.h
+
+abs.o: $(srcdir)/abs.c $(H)
+add.o: $(srcdir)/add.c $(H)
+add_ui.o: $(srcdir)/add_ui.c $(H)
+and.o: $(srcdir)/and.c $(H)
+array_init.o: $(srcdir)/array_init.c $(H)
+cdiv_q.o: $(srcdir)/cdiv_q.c $(H)
+cdiv_q_ui.o: $(srcdir)/cdiv_q_ui.c $(H)
+cdiv_qr.o: $(srcdir)/cdiv_qr.c $(H)
+cdiv_qr_ui.o: $(srcdir)/cdiv_qr_ui.c $(H)
+cdiv_r.o: $(srcdir)/cdiv_r.c $(H)
+cdiv_r_ui.o: $(srcdir)/cdiv_r_ui.c $(H)
+cdiv_ui.o: $(srcdir)/cdiv_ui.c $(H)
+clear.o: $(srcdir)/clear.c $(H)
+clrbit.o: $(srcdir)/clrbit.c $(H)
+cmp.o: $(srcdir)/cmp.c $(H)
+cmp_si.o: $(srcdir)/cmp_si.c $(H)
+cmp_ui.o: $(srcdir)/cmp_ui.c $(H)
+com.o: $(srcdir)/com.c $(H)
+fdiv_q_2exp.o: $(srcdir)/fdiv_q_2exp.c $(H)
+fdiv_r_2exp.o: $(srcdir)/fdiv_r_2exp.c $(H)
+divexact.o: $(srcdir)/divexact.c $(H) $(srcdir)/../longlong.h
+fac_ui.o: $(srcdir)/fac_ui.c $(H) $(srcdir)/../longlong.h
+fdiv_q.o: $(srcdir)/fdiv_q.c $(H)
+fdiv_q_ui.o: $(srcdir)/fdiv_q_ui.c $(H)
+fdiv_qr.o: $(srcdir)/fdiv_qr.c $(H)
+fdiv_qr_ui.o: $(srcdir)/fdiv_qr_ui.c $(H)
+fdiv_r.o: $(srcdir)/fdiv_r.c $(H)
+fdiv_r_ui.o: $(srcdir)/fdiv_r_ui.c $(H)
+fdiv_ui.o: $(srcdir)/fdiv_ui.c $(H)
+gcd.o: $(srcdir)/gcd.c $(H) $(srcdir)/../longlong.h
+gcd_ui.o: $(srcdir)/gcd_ui.c $(H)
+gcdext.o: $(srcdir)/gcdext.c $(H)
+get_d.o: $(srcdir)/get_d.c $(H)
+get_si.o: $(srcdir)/get_si.c $(H)
+get_str.o: $(srcdir)/get_str.c $(H)
+get_ui.o: $(srcdir)/get_ui.c $(H)
+getlimbn.o: $(srcdir)/getlimbn.c $(H)
+hamdist.o: $(srcdir)/hamdist.c $(H)
+init.o: $(srcdir)/init.c $(H)
+inp_raw.o: $(srcdir)/inp_raw.c $(H)
+inp_str.o: $(srcdir)/inp_str.c $(H)
+invert.o: $(srcdir)/invert.c $(H)
+ior.o: $(srcdir)/ior.c $(H)
+iset.o: $(srcdir)/iset.c $(H)
+iset_d.o: $(srcdir)/iset_d.c $(H)
+iset_si.o: $(srcdir)/iset_si.c $(H)
+iset_str.o: $(srcdir)/iset_str.c $(H)
+iset_ui.o: $(srcdir)/iset_ui.c $(H)
+jacobi.o: $(srcdir)/jacobi.c $(H)
+legendre.o: $(srcdir)/legendre.c $(H)
+mod.o: $(srcdir)/mod.c $(H)
+tdiv_q_2exp.o: $(srcdir)/tdiv_q_2exp.c $(H)
+tdiv_r_2exp.o: $(srcdir)/tdiv_r_2exp.c $(H)
+mul.o: $(srcdir)/mul.c $(H)
+mul_2exp.o: $(srcdir)/mul_2exp.c $(H)
+mul_ui.o: $(srcdir)/mul_ui.c $(H)
+neg.o: $(srcdir)/neg.c $(H)
+out_raw.o: $(srcdir)/out_raw.c $(H)
+out_str.o: $(srcdir)/out_str.c $(H)
+perfsqr.o: $(srcdir)/perfsqr.c $(H)
+popcount.o: $(srcdir)/popcount.c $(H)
+pow_ui.o: $(srcdir)/pow_ui.c $(H) $(srcdir)/../longlong.h
+powm.o: $(srcdir)/powm.c $(H) $(srcdir)/../longlong.h
+powm_ui.o: $(srcdir)/powm_ui.c $(H) $(srcdir)/../longlong.h
+pprime_p.o: $(srcdir)/pprime_p.c $(H)
+random.o: $(srcdir)/random.c $(H) $(srcdir)/../urandom.h
+random2.o: $(srcdir)/random2.c $(H)
+realloc.o: $(srcdir)/realloc.c $(H)
+scan0.o: $(srcdir)/scan0.c $(H)
+scan1.o: $(srcdir)/scan1.c $(H)
+set.o: $(srcdir)/set.c $(H)
+set_d.o: $(srcdir)/set_d.c $(H)
+set_f.o: $(srcdir)/set_f.c $(H)
+set_q.o: $(srcdir)/set_q.c $(H)
+set_si.o: $(srcdir)/set_si.c $(H)
+set_str.o: $(srcdir)/set_str.c $(H) $(srcdir)/../longlong.h
+set_ui.o: $(srcdir)/set_ui.c $(H)
+setbit.o: $(srcdir)/setbit.c $(H)
+size.o: $(srcdir)/size.c $(H)
+sizeinbase.o: $(srcdir)/sizeinbase.c $(H) $(srcdir)/../longlong.h
+sqrt.o: $(srcdir)/sqrt.c $(H)
+sqrtrem.o: $(srcdir)/sqrtrem.c $(H)
+sub.o: $(srcdir)/sub.c $(H)
+sub_ui.o: $(srcdir)/sub_ui.c $(H)
+tdiv_q.o: $(srcdir)/tdiv_q.c $(H) $(srcdir)/../longlong.h
+tdiv_q_ui.o: $(srcdir)/tdiv_q_ui.c $(H)
+tdiv_qr.o: $(srcdir)/tdiv_qr.c $(H) $(srcdir)/../longlong.h $(srcdir)/dmincl.c $(H)
+tdiv_qr_ui.o: $(srcdir)/tdiv_qr_ui.c $(H)
+tdiv_r.o: $(srcdir)/tdiv_r.c $(H) $(srcdir)/../longlong.h $(srcdir)/dmincl.c $(H)
+tdiv_r_ui.o: $(srcdir)/tdiv_r_ui.c $(H)
+ui_pow_ui.o: $(srcdir)/ui_pow_ui.c $(H) $(srcdir)/../longlong.h