[Gmp-commit] /var/hg/gmp: 13 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Thu Dec 1 20:47:16 CET 2011


details:   /var/hg/gmp/rev/dedb97c73351
changeset: 14496:dedb97c73351
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 14:08:55 2011 +0100
description:
Define LEA and PIC.

details:   /var/hg/gmp/rev/7b385ffed16d
changeset: 14497:7b385ffed16d
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 14:11:06 2011 +0100
description:
Fix typo in return typo.

details:   /var/hg/gmp/rev/e0f49aa4fab8
changeset: 14498:e0f49aa4fab8
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 14:13:09 2011 +0100
description:
Wrap .protected decl.

details:   /var/hg/gmp/rev/e570098e74d6
changeset: 14499:e570098e74d6
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 14:23:37 2011 +0100
description:
Enable for DOS64.

details:   /var/hg/gmp/rev/85e439cb409f
changeset: 14500:85e439cb409f
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 15:35:36 2011 +0100
description:
Add DOS64 ABI support.

details:   /var/hg/gmp/rev/3dae31c786da
changeset: 14501:3dae31c786da
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 19:23:30 2011 +0100
description:
(IFDOS, IFSTD): New defines.

details:   /var/hg/gmp/rev/b664d8e59c41
changeset: 14502:b664d8e59c41
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 19:29:35 2011 +0100
description:
Rewrite to support DOS64.

details:   /var/hg/gmp/rev/ffb2cfbe53e2
changeset: 14503:ffb2cfbe53e2
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 19:36:30 2011 +0100
description:
Add GMP_NONSTD_ABI also for fat builds.

details:   /var/hg/gmp/rev/be85f690695c
changeset: 14504:be85f690695c
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 19:40:09 2011 +0100
description:
Finish DOS64 support.

details:   /var/hg/gmp/rev/2d57baf5be5d
changeset: 14505:2d57baf5be5d
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 19:41:05 2011 +0100
description:
Add DOS64 ABI support.

details:   /var/hg/gmp/rev/625e761cf985
changeset: 14506:625e761cf985
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 19:41:13 2011 +0100
description:
*** empty log message ***

details:   /var/hg/gmp/rev/e30568551695
changeset: 14507:e30568551695
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 19:51:28 2011 +0100
description:
(STD64, IFSTD): New names for ELF64, IFELF .

details:   /var/hg/gmp/rev/32d6be757885
changeset: 14508:32d6be757885
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 01 19:51:35 2011 +0100
description:
*** empty log message ***

diffstat:

 ChangeLog                         |   30 +++++++++++
 configure.in                      |   27 +++++----
 gmp-impl.h                        |    2 +-
 mpn/x86_64/addmul_2.asm           |    2 +-
 mpn/x86_64/aorrlsh1_n.asm         |    2 +-
 mpn/x86_64/aorrlsh2_n.asm         |    2 +-
 mpn/x86_64/aorrlshC_n.asm         |    2 +-
 mpn/x86_64/aorrlsh_n.asm          |   10 +---
 mpn/x86_64/aors_n.asm             |   10 +---
 mpn/x86_64/aorscnd_n.asm          |   10 +---
 mpn/x86_64/aorsmul_1.asm          |   14 +----
 mpn/x86_64/bdiv_dbm1c.asm         |   10 +---
 mpn/x86_64/bdiv_q_1.asm           |   10 +---
 mpn/x86_64/com.asm                |    2 +-
 mpn/x86_64/copyd.asm              |    2 +-
 mpn/x86_64/copyi.asm              |    2 +-
 mpn/x86_64/core2/aorrlsh1_n.asm   |    2 +-
 mpn/x86_64/core2/aorrlsh2_n.asm   |    2 +-
 mpn/x86_64/core2/aorrlsh_n.asm    |    2 +-
 mpn/x86_64/core2/aors_n.asm       |   10 +---
 mpn/x86_64/core2/aorsmul_1.asm    |    2 +-
 mpn/x86_64/core2/divrem_1.asm     |   25 +++++++--
 mpn/x86_64/core2/lshift.asm       |    2 +-
 mpn/x86_64/core2/lshiftc.asm      |    2 +-
 mpn/x86_64/core2/rsh1aors_n.asm   |   10 +---
 mpn/x86_64/core2/rshift.asm       |    2 +-
 mpn/x86_64/core2/sublsh1_n.asm    |    2 +-
 mpn/x86_64/core2/sublsh2_n.asm    |    2 +-
 mpn/x86_64/coreinhm/aorrlsh_n.asm |   10 +---
 mpn/x86_64/coreinhm/hamdist.asm   |    5 +-
 mpn/x86_64/coreinhm/popcount.asm  |    5 +-
 mpn/x86_64/coreisbr/aors_n.asm    |   10 +---
 mpn/x86_64/dive_1.asm             |   11 +++-
 mpn/x86_64/divrem_1.asm           |   40 +++++++++----
 mpn/x86_64/divrem_2.asm           |    8 ++-
 mpn/x86_64/dos64.m4               |   22 +++++++-
 mpn/x86_64/fat/fat_entry.asm      |   40 ++++++++++----
 mpn/x86_64/invert_limb.asm        |    5 +-
 mpn/x86_64/invert_limb_table.asm  |    2 +-
 mpn/x86_64/k10/hamdist.asm        |    9 ++-
 mpn/x86_64/k10/popcount.asm       |    7 ++-
 mpn/x86_64/k8/aorrlsh_n.asm       |    6 ++
 mpn/x86_64/logops_n.asm           |    2 +-
 mpn/x86_64/lshift.asm             |    2 +-
 mpn/x86_64/lshiftc.asm            |    2 +-
 mpn/x86_64/lshsub_n.asm           |   10 +---
 mpn/x86_64/mod_1_1.asm            |    7 +-
 mpn/x86_64/mod_1_2.asm            |    8 +-
 mpn/x86_64/mod_1_4.asm            |    7 +-
 mpn/x86_64/mod_34lsub1.asm        |    4 +-
 mpn/x86_64/mode1o.asm             |  103 ++++++++++++++++++-------------------
 mpn/x86_64/mul_1.asm              |   16 +----
 mpn/x86_64/mul_2.asm              |    2 +-
 mpn/x86_64/mul_basecase.asm       |   10 +---
 mpn/x86_64/mulmid_basecase.asm    |   10 +---
 mpn/x86_64/popham.asm             |    2 +-
 mpn/x86_64/redc_1.asm             |    2 +-
 mpn/x86_64/rsh1aors_n.asm         |   10 +---
 mpn/x86_64/rshift.asm             |    2 +-
 mpn/x86_64/sqr_basecase.asm       |    2 +-
 mpn/x86_64/sublsh1_n.asm          |    2 +-
 mpn/x86_64/tabselect.asm          |   10 +---
 mpn/x86_64/x86_64-defs.m4         |    3 +
 63 files changed, 302 insertions(+), 294 deletions(-)

diffs (truncated from 1620 to 300 lines):

diff -r cf1183149cdb -r 32d6be757885 ChangeLog
--- a/ChangeLog	Tue Nov 29 23:28:07 2011 +0100
+++ b/ChangeLog	Thu Dec 01 19:51:35 2011 +0100
@@ -1,3 +1,33 @@
+2011-12-01  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/x86_64 (STD64, IFSTD): New names for ELF64, IFELF (since these
+	denote all standard calling conventions).
+
+	* mpn/x86_64: Add DOS64 ABI support to more files.
+
+	* mpn/x86_64/mod_1_1.asm: Finish DOS64 support.
+	* mpn/x86_64/mod_1_2.asm: Likewise.
+	* mpn/x86_64/mod_1_4.asm: Likewise.
+
+	* configure.in: Add GMP_NONSTD_ABI also for fat builds.
+
+	* mpn/x86_64/fat/fat_entry.asm: Rewrite to support DOS64.
+
+	* mpn/x86_64/dos64.m4 (IFDOS, IFSTD): New defines.
+	* mpn/x86_64/x86_64-defs (IFDOS, IFSTD): New defines.
+
+	* mpn/x86_64/dive_1.asm: Add DOS64 ABI support.
+	* mpn/x86_64/mode1o.asm: Likewise.
+
+	* mpn/x86_64/mod_34lsub1.asm: Enable for DOS64.
+
+	* mpn/x86_64/invert_limb.asm: Wrap .protected decl.
+
+	* gmp-impl.h (DECL_divexact_1): Fix typo in return typo.
+
+	* mpn/x86_64/dos64.m4 (LEA): New define.
+	(PIC): Define.
+
 2011-11-29  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/x86_64: Add DOS64 ABI support to most files.
diff -r cf1183149cdb -r 32d6be757885 configure.in
--- a/configure.in	Tue Nov 29 23:28:07 2011 +0100
+++ b/configure.in	Thu Dec 01 19:51:35 2011 +0100
@@ -1929,17 +1929,9 @@
 
       if test "$abi" = 64; then
 	gcc_64_cflags=""
-	case $host in
-	  *-*-mingw* | *-*-cygwin)
-	    path_64=""	# Windows amd64 calling conventions are *different*
-	    fat_path=""
-	    ;;
-	  *)
-	    extra_functions_64="$extra_functions_64 fat fat_entry"
-	    path_64="x86_64/fat x86_64"
-	    fat_path="x86_64 x86_64/fat x86_64/pentium4 x86_64/core2 x86_64/coreinhm x86_64/coreisbr x86_64/atom x86_64/nano"
-	    ;;
-	esac
+	extra_functions_64="$extra_functions_64 fat fat_entry"
+	path_64="x86_64/fat x86_64"
+	fat_path="x86_64 x86_64/fat x86_64/pentium4 x86_64/core2 x86_64/coreinhm x86_64/coreisbr x86_64/atom x86_64/nano"
       fi
 
       fat_functions="add_n addmul_1 copyd copyi
@@ -2899,6 +2891,17 @@
           tmp_file=$srcdir/mpn/$tmp_dir/$tmp_base.$tmp_ext
           if test -f $tmp_file; then
 
+	    # If the host uses a non-standard ABI, check if tmp_file supports it
+	    #
+	    if test -n "$GMP_NONSTD_ABI" && test $tmp_ext != "c"; then
+	      abi=[`sed -n 's/^[ 	]*ABI_SUPPORT(\(.*\))/\1/p' $tmp_file `]
+	      if echo "$abi" | grep -q "\\b${GMP_NONSTD_ABI}\\b"; then
+		true
+	      else
+		continue
+	      fi
+	    fi
+
             mpn_objects="$mpn_objects ${tmp_prefix}_$tmp_fn.lo"
             mpn_objs_in_libgmp="$mpn_objs_in_libgmp mpn/${tmp_prefix}_$tmp_fn.lo"
 
@@ -3062,7 +3065,7 @@
 
 	  # If the host uses a non-standard ABI, check if tmp_file supports it
 	  #
-	  if test -n "$GMP_NONSTD_ABI" && test $tmp_dir != generic; then
+	  if test -n "$GMP_NONSTD_ABI" && test $tmp_ext != "c"; then
 	    abi=[`sed -n 's/^[ 	]*ABI_SUPPORT(\(.*\))/\1/p' $tmp_file `]
 	    if echo "$abi" | grep -q "\\b${GMP_NONSTD_ABI}\\b"; then
 	      true
diff -r cf1183149cdb -r 32d6be757885 gmp-impl.h
--- a/gmp-impl.h	Tue Nov 29 23:28:07 2011 +0100
+++ b/gmp-impl.h	Thu Dec 01 19:51:35 2011 +0100
@@ -64,7 +64,7 @@
 #define DECL_copyi(name) \
   DECL_copyd (name)
 #define DECL_divexact_1(name) \
-  __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t))
+  __GMP_DECLSPEC void name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t))
 #define DECL_divexact_by3c(name) \
   __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t))
 #define DECL_divrem_1(name) \
diff -r cf1183149cdb -r 32d6be757885 mpn/x86_64/addmul_2.asm
--- a/mpn/x86_64/addmul_2.asm	Tue Nov 29 23:28:07 2011 +0100
+++ b/mpn/x86_64/addmul_2.asm	Thu Dec 01 19:51:35 2011 +0100
@@ -51,7 +51,7 @@
 define(`n',  `%r11')
 
 ABI_SUPPORT(DOS64)
-ABI_SUPPORT(ELF64)
+ABI_SUPPORT(STD64)
 
 ASM_START()
 	TEXT
diff -r cf1183149cdb -r 32d6be757885 mpn/x86_64/aorrlsh1_n.asm
--- a/mpn/x86_64/aorrlsh1_n.asm	Tue Nov 29 23:28:07 2011 +0100
+++ b/mpn/x86_64/aorrlsh1_n.asm	Thu Dec 01 19:51:35 2011 +0100
@@ -56,7 +56,7 @@
 MULFUNC_PROLOGUE(mpn_addlsh1_n mpn_rsblsh1_n)
 
 ABI_SUPPORT(DOS64)
-ABI_SUPPORT(ELF64)
+ABI_SUPPORT(STD64)
 
 ASM_START()
 	TEXT
diff -r cf1183149cdb -r 32d6be757885 mpn/x86_64/aorrlsh2_n.asm
--- a/mpn/x86_64/aorrlsh2_n.asm	Tue Nov 29 23:28:07 2011 +0100
+++ b/mpn/x86_64/aorrlsh2_n.asm	Thu Dec 01 19:51:35 2011 +0100
@@ -37,6 +37,6 @@
 MULFUNC_PROLOGUE(mpn_addlsh2_n mpn_rsblsh2_n)
 
 ABI_SUPPORT(DOS64)
-ABI_SUPPORT(ELF64)
+ABI_SUPPORT(STD64)
 
 include_mpn(`x86_64/aorrlshC_n.asm')
diff -r cf1183149cdb -r 32d6be757885 mpn/x86_64/aorrlshC_n.asm
--- a/mpn/x86_64/aorrlshC_n.asm	Tue Nov 29 23:28:07 2011 +0100
+++ b/mpn/x86_64/aorrlshC_n.asm	Thu Dec 01 19:51:35 2011 +0100
@@ -38,7 +38,7 @@
 define(M, eval(m4_lshift(1,LSH)))
 
 ABI_SUPPORT(DOS64)
-ABI_SUPPORT(ELF64)
+ABI_SUPPORT(STD64)
 
 ASM_START()
 	TEXT
diff -r cf1183149cdb -r 32d6be757885 mpn/x86_64/aorrlsh_n.asm
--- a/mpn/x86_64/aorrlsh_n.asm	Tue Nov 29 23:28:07 2011 +0100
+++ b/mpn/x86_64/aorrlsh_n.asm	Thu Dec 01 19:51:35 2011 +0100
@@ -56,16 +56,8 @@
 
 MULFUNC_PROLOGUE(mpn_addlsh_n mpn_rsblsh_n)
 
-ifdef(`HOST_DOS64',`
-  define(`IFDOS',   `$1')
-  define(`IFELF',   `')
-',`
-  define(`IFDOS',   `')
-  define(`IFELF',   `$1')
-')
-
 ABI_SUPPORT(DOS64)
-ABI_SUPPORT(ELF64)
+ABI_SUPPORT(STD64)
 
 ASM_START()
 	TEXT
diff -r cf1183149cdb -r 32d6be757885 mpn/x86_64/aors_n.asm
--- a/mpn/x86_64/aors_n.asm	Tue Nov 29 23:28:07 2011 +0100
+++ b/mpn/x86_64/aors_n.asm	Thu Dec 01 19:51:35 2011 +0100
@@ -51,16 +51,8 @@
 
 MULFUNC_PROLOGUE(mpn_add_n mpn_add_nc mpn_sub_n mpn_sub_nc)
 
-ifdef(`HOST_DOS64',`
-  define(`IFDOS',   `$1')
-  define(`IFELF',   `')
-',`
-  define(`IFDOS',   `')
-  define(`IFELF',   `$1')
-')
-
 ABI_SUPPORT(DOS64)
-ABI_SUPPORT(ELF64)
+ABI_SUPPORT(STD64)
 
 ASM_START()
 	TEXT
diff -r cf1183149cdb -r 32d6be757885 mpn/x86_64/aorscnd_n.asm
--- a/mpn/x86_64/aorscnd_n.asm	Tue Nov 29 23:28:07 2011 +0100
+++ b/mpn/x86_64/aorscnd_n.asm	Thu Dec 01 19:51:35 2011 +0100
@@ -59,16 +59,8 @@
 
 MULFUNC_PROLOGUE(mpn_addcnd_n mpn_subcnd_n)
 
-ifdef(`HOST_DOS64',`
-  define(`IFDOS',   `$1')
-  define(`IFELF',   `')
-',`
-  define(`IFDOS',   `')
-  define(`IFELF',   `$1')
-')
-
 ABI_SUPPORT(DOS64)
-ABI_SUPPORT(ELF64)
+ABI_SUPPORT(STD64)
 
 ASM_START()
 	TEXT
diff -r cf1183149cdb -r 32d6be757885 mpn/x86_64/aorsmul_1.asm
--- a/mpn/x86_64/aorsmul_1.asm	Tue Nov 29 23:28:07 2011 +0100
+++ b/mpn/x86_64/aorsmul_1.asm	Thu Dec 01 19:51:35 2011 +0100
@@ -42,14 +42,6 @@
 
 define(`n',       `%r11')
 
-ifdef(`HOST_DOS64',`
-  define(`IFDOS',   `$1')
-  define(`IFELF',   `')
-',`
-  define(`IFDOS',   `')
-  define(`IFELF',   `$1')
-')
-
 ifdef(`OPERATION_addmul_1',`
       define(`ADDSUB',        `add')
       define(`func',  `mpn_addmul_1')
@@ -60,7 +52,7 @@
 ')
 
 ABI_SUPPORT(DOS64)
-ABI_SUPPORT(ELF64)
+ABI_SUPPORT(STD64)
 
 MULFUNC_PROLOGUE(mpn_addmul_1 mpn_submul_1)
 
@@ -82,10 +74,10 @@
 
 	mov	(up), %rax		C read first u limb early
 	push	%rbx
-IFELF(`	mov	n_param, %rbx   ')	C move away n  from rdx, mul uses it
+IFSTD(`	mov	n_param, %rbx   ')	C move away n  from rdx, mul uses it
 IFDOS(`	mov	n, %rbx         ')
 	mul	vl
-IFELF(`	mov	%rbx, n         ')
+IFSTD(`	mov	%rbx, n         ')
 
 	and	$3, R32(%rbx)
 	jz	L(b0)
diff -r cf1183149cdb -r 32d6be757885 mpn/x86_64/bdiv_dbm1c.asm
--- a/mpn/x86_64/bdiv_dbm1c.asm	Tue Nov 29 23:28:07 2011 +0100
+++ b/mpn/x86_64/bdiv_dbm1c.asm	Thu Dec 01 19:51:35 2011 +0100
@@ -41,16 +41,8 @@
 
 define(`n',       `%r9')
 
-ifdef(`HOST_DOS64',`
-  define(`IFDOS',   `$1')
-  define(`IFELF',   `')
-',`
-  define(`IFDOS',   `')
-  define(`IFELF',   `$1')
-')
-
 ABI_SUPPORT(DOS64)
-ABI_SUPPORT(ELF64)
+ABI_SUPPORT(STD64)
 
 ASM_START()
 	TEXT
diff -r cf1183149cdb -r 32d6be757885 mpn/x86_64/bdiv_q_1.asm
--- a/mpn/x86_64/bdiv_q_1.asm	Tue Nov 29 23:28:07 2011 +0100
+++ b/mpn/x86_64/bdiv_q_1.asm	Thu Dec 01 19:51:35 2011 +0100
@@ -41,16 +41,8 @@
 C shift		r9	just mpn_pi1_bdiv_q_1
 
 
-ifdef(`HOST_DOS64',`
-  define(`IFDOS',   `$1')
-  define(`IFELF',   `')
-',`
-  define(`IFDOS',   `')
-  define(`IFELF',   `$1')
-')
-
 ABI_SUPPORT(DOS64)
-ABI_SUPPORT(ELF64)
+ABI_SUPPORT(STD64)
 
 ASM_START()
 	TEXT
diff -r cf1183149cdb -r 32d6be757885 mpn/x86_64/com.asm
--- a/mpn/x86_64/com.asm	Tue Nov 29 23:28:07 2011 +0100
+++ b/mpn/x86_64/com.asm	Thu Dec 01 19:51:35 2011 +0100
@@ -35,7 +35,7 @@
 define(`n',`%rdx')
 
 ABI_SUPPORT(DOS64)
-ABI_SUPPORT(ELF64)


More information about the gmp-commit mailing list