diff -uNr gmp-6.0.0/mpn/x86_64/atom/redc_1.asm gmp-6.0.0.fink/mpn/x86_64/atom/redc_1.asm
--- gmp-6.0.0/mpn/x86_64/atom/redc_1.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/atom/redc_1.asm	2014-07-04 00:20:03.000000000 -0400
@@ -276,7 +276,12 @@
 	mov	n, %r9			C param 4: n
 	mov	rp, %rcx	')	C param 1: rp
 
+IFSTD(`	sub	$8, %rsp	')
+IFDOS(`	sub	$40, %rsp	')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_add_n)
+IFSTD(`	add	$8, %rsp	')
+IFDOS(`	add	$40, %rsp	')
 
 L(ret):	pop	%r15
 	pop	%r14
diff -uNr gmp-6.0.0/mpn/x86_64/bobcat/redc_1.asm gmp-6.0.0.fink/mpn/x86_64/bobcat/redc_1.asm
--- gmp-6.0.0/mpn/x86_64/bobcat/redc_1.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/bobcat/redc_1.asm	2014-07-04 00:20:03.000000000 -0400
@@ -258,7 +258,12 @@
 	mov	n, %r9			C param 4: n
 	mov	rp, %rcx	')	C param 1: rp
 
+IFSTD(`	sub	$8, %rsp	')
+IFDOS(`	sub	$40, %rsp	')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_add_n)
+IFSTD(`	add	$8, %rsp	')
+IFDOS(`	add	$40, %rsp	')
 
 L(ret):	pop	%r15
 	pop	%r14
diff -uNr gmp-6.0.0/mpn/x86_64/core2/divrem_1.asm gmp-6.0.0.fink/mpn/x86_64/core2/divrem_1.asm
--- gmp-6.0.0/mpn/x86_64/core2/divrem_1.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/core2/divrem_1.asm	2014-07-04 00:20:03.000000000 -0400
@@ -1,6 +1,6 @@
 dnl  x86-64 mpn_divrem_1 -- mpn by limb division.
 
-dnl  Copyright 2004, 2005, 2007-2010, 2012 Free Software Foundation, Inc.
+dnl  Copyright 2004, 2005, 2007-2010, 2012, 2014 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -138,9 +138,14 @@
 IFSTD(`	push	%rdi		')
 IFSTD(`	push	%rsi		')
 	push	%r8
+IFSTD(`	sub	$8, %rsp	')
 IFSTD(`	mov	d, %rdi		')
+IFDOS(`	sub	$40, %rsp	')
 IFDOS(`	mov	d, %rcx		')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_invert_limb)
+IFSTD(`	add	$8, %rsp	')
+IFDOS(`	add	$40, %rsp	')
 	pop	%r8
 IFSTD(`	pop	%rsi		')
 IFSTD(`	pop	%rdi		')
@@ -150,6 +155,7 @@
 	mov	%rbp, %rax
 	test	un, un
 	je	L(frac)
+
 L(ent):	mov	-8(up,un,8), %rbp
 	shr	R8(%rcx), %rax
 	shld	R8(%rcx), %rbp, %rax
diff -uNr gmp-6.0.0/mpn/x86_64/core2/gcd_1.asm gmp-6.0.0.fink/mpn/x86_64/core2/gcd_1.asm
--- gmp-6.0.0/mpn/x86_64/core2/gcd_1.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/core2/gcd_1.asm	2014-07-04 00:20:03.000000000 -0400
@@ -108,12 +108,14 @@
 IFDOS(`	mov	%rdx, %r8	')
 IFDOS(`	mov	%rsi, %rdx	')
 IFDOS(`	mov	%rdi, %rcx	')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_mod_1)
 	jmp	L(reduced)
 L(bmod):
 IFDOS(`	mov	%rdx, %r8	')
 IFDOS(`	mov	%rsi, %rdx	')
 IFDOS(`	mov	%rdi, %rcx	')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_modexact_1_odd)
 L(reduced):
 
diff -uNr gmp-6.0.0/mpn/x86_64/core2/redc_1.asm gmp-6.0.0.fink/mpn/x86_64/core2/redc_1.asm
--- gmp-6.0.0/mpn/x86_64/core2/redc_1.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/core2/redc_1.asm	2014-07-04 00:20:03.000000000 -0400
@@ -280,7 +280,12 @@
 	mov	n, %r9			C param 4: n
 	mov	rp, %rcx	')	C param 1: rp
 
+IFSTD(`	sub	$8, %rsp	')
+IFDOS(`	sub	$40, %rsp	')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_add_n)
+IFSTD(`	add	$8, %rsp	')
+IFDOS(`	add	$40, %rsp	')
 
 L(ret):	pop	%r15
 	pop	%r14
diff -uNr gmp-6.0.0/mpn/x86_64/coreihwl/redc_1.asm gmp-6.0.0.fink/mpn/x86_64/coreihwl/redc_1.asm
--- gmp-6.0.0/mpn/x86_64/coreihwl/redc_1.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/coreihwl/redc_1.asm	2014-07-04 00:20:03.000000000 -0400
@@ -409,7 +409,7 @@
 
 L(cj):
 IFSTD(`	mov	8(%rsp), %rdi		C param 1: rp
-	lea	16(%rsp), %rsp		C deallocate two slots
+	lea	16-8(%rsp), %rsp	C deallocate 2, add back for alignment
 	lea	(up,n,8), %rdx		C param 3: up - n
 	neg	R32(n)		')	C param 4: n
 
@@ -418,10 +418,14 @@
 	neg	R32(n)
 	mov	n, %r9			C param 4: n
 	mov	8(%rsp), %rcx		C param 1: rp
-	lea	16(%rsp), %rsp	')	C deallocate two slots
+	lea	16-32-8(%rsp), %rsp')	C deallocate 2, allocate shadow, align
 
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_add_n)
 
+IFSTD(`	lea	8(%rsp), %rsp	')
+IFDOS(`	lea	32+8(%rsp), %rsp')
+
 L(ret):	pop	%r15
 	pop	%r14
 	pop	%r13
diff -uNr gmp-6.0.0/mpn/x86_64/coreinhm/redc_1.asm gmp-6.0.0.fink/mpn/x86_64/coreinhm/redc_1.asm
--- gmp-6.0.0/mpn/x86_64/coreinhm/redc_1.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/coreinhm/redc_1.asm	2014-07-04 00:20:03.000000000 -0400
@@ -276,7 +276,12 @@
 	mov	n, %r9			C param 4: n
 	mov	rp, %rcx	')	C param 1: rp
 
+IFSTD(`	sub	$8, %rsp	')
+IFDOS(`	sub	$40, %rsp	')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_add_n)
+IFSTD(`	add	$8, %rsp	')
+IFDOS(`	add	$40, %rsp	')
 
 L(ret):	pop	%r15
 	pop	%r14
diff -uNr gmp-6.0.0/mpn/x86_64/coreisbr/redc_1.asm gmp-6.0.0.fink/mpn/x86_64/coreisbr/redc_1.asm
--- gmp-6.0.0/mpn/x86_64/coreisbr/redc_1.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/coreisbr/redc_1.asm	2014-07-04 00:20:03.000000000 -0400
@@ -282,7 +282,12 @@
 	mov	n, %r9			C param 4: n
 	mov	rp, %rcx	')	C param 1: rp
 
+IFSTD(`	sub	$8, %rsp	')
+IFDOS(`	sub	$40, %rsp	')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_add_n)
+IFSTD(`	add	$8, %rsp	')
+IFDOS(`	add	$40, %rsp	')
 
 L(ret):	pop	%r15
 	pop	%r14
diff -uNr gmp-6.0.0/mpn/x86_64/divrem_1.asm gmp-6.0.0.fink/mpn/x86_64/divrem_1.asm
--- gmp-6.0.0/mpn/x86_64/divrem_1.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/divrem_1.asm	2014-07-04 00:20:03.000000000 -0400
@@ -1,6 +1,6 @@
 dnl  x86-64 mpn_divrem_1 -- mpn by limb division.
 
-dnl  Copyright 2004, 2005, 2007-2012 Free Software Foundation, Inc.
+dnl  Copyright 2004, 2005, 2007-2012, 2014 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -140,8 +140,11 @@
 IFSTD(`	push	%rsi		')
 	push	%r8
 IFSTD(`	mov	d, %rdi		')
+IFDOS(`	sub	$32, %rsp	')
 IFDOS(`	mov	d, %rcx		')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_invert_limb)
+IFDOS(`	add	$32, %rsp	')
 	pop	%r8
 IFSTD(`	pop	%rsi		')
 IFSTD(`	pop	%rdi		')
@@ -173,7 +176,7 @@
 	jns	L(ntop)			C
 
 	xor	R32(%rcx), R32(%rcx)
-	jmp	L(87)
+	jmp	L(frac)
 
 L(nfx):	sub	d, %rax
 	inc	%r13
@@ -200,9 +203,14 @@
 IFSTD(`	push	%rdi		')
 IFSTD(`	push	%rsi		')
 	push	%r8
+IFSTD(`	sub	$8, %rsp	')
 IFSTD(`	mov	d, %rdi		')
+IFDOS(`	sub	$40, %rsp	')
 IFDOS(`	mov	d, %rcx		')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_invert_limb)
+IFSTD(`	add	$8, %rsp	')
+IFDOS(`	add	$40, %rsp	')
 	pop	%r8
 IFSTD(`	pop	%rsi		')
 IFSTD(`	pop	%rdi		')
@@ -211,7 +219,7 @@
 	mov	%rax, dinv
 	mov	%rbp, %rax
 	test	un, un
-	je	L(87)
+	je	L(frac)
 
 L(uent):dec	un
 	mov	(up,un,8), %rbp
@@ -266,7 +274,7 @@
 	jae	L(efx)
 L(eok):	mov	%r13, (qp)
 	sub	$8, qp
-	jmp	L(87)
+	jmp	L(frac)
 
 L(ufx):	sub	d, %rax
 	inc	%r13
@@ -275,7 +283,7 @@
 	inc	%r13
 	jmp	L(eok)
 
-L(87):	mov	d, %rbp
+L(frac):mov	d, %rbp
 	neg	%rbp
 	jmp	L(fent)
 
diff -uNr gmp-6.0.0/mpn/x86_64/divrem_2.asm gmp-6.0.0.fink/mpn/x86_64/divrem_2.asm
--- gmp-6.0.0/mpn/x86_64/divrem_2.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/divrem_2.asm	2014-07-04 00:20:03.000000000 -0400
@@ -1,6 +1,6 @@
 dnl  x86-64 mpn_divrem_2 -- Divide an mpn number by a normalized 2-limb number.
 
-dnl  Copyright 2007, 2008, 2010 Free Software Foundation, Inc.
+dnl  Copyright 2007, 2008, 2010, 2014 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -100,6 +100,7 @@
 	push	%r11
 IFSTD(`	mov	%r11, %rdi	')
 IFDOS(`	mov	%r11, %rcx	')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_invert_limb)
 	pop	%r11
 	pop	%r10
diff -uNr gmp-6.0.0/mpn/x86_64/gcd_1.asm gmp-6.0.0.fink/mpn/x86_64/gcd_1.asm
--- gmp-6.0.0/mpn/x86_64/gcd_1.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/gcd_1.asm	2014-07-04 00:20:03.000000000 -0400
@@ -112,6 +112,7 @@
 IFDOS(`	mov	%rdx, %r8	')
 IFDOS(`	mov	%rsi, %rdx	')
 IFDOS(`	mov	%rdi, %rcx	')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_modexact_1_odd)
 
 L(reduced):
@@ -134,6 +135,7 @@
 IFDOS(`	mov	%rdx, %r8	')
 IFDOS(`	mov	%rsi, %rdx	')
 IFDOS(`	mov	%rdi, %rcx	')
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_mod_1)
 	jmp	L(reduced)
 
diff -uNr gmp-6.0.0/mpn/x86_64/mod_1_1.asm gmp-6.0.0.fink/mpn/x86_64/mod_1_1.asm
--- gmp-6.0.0/mpn/x86_64/mod_1_1.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/mod_1_1.asm	2014-07-04 00:20:03.000000000 -0400
@@ -2,7 +2,7 @@
 
 dnl  Contributed to the GNU project by Torbjörn Granlund and Niels Möller.
 
-dnl  Copyright 2009-2012 Free Software Foundation, Inc.
+dnl  Copyright 2009-2012, 2014 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -198,6 +198,7 @@
 	sal	R8(%rcx), %r12
 IFSTD(`	mov	%r12, %rdi	')	C pass parameter
 IFDOS(`	mov	%r12, %rcx	')	C pass parameter
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_invert_limb)
 	neg	%r12
 	mov	%r12, %r8
diff -uNr gmp-6.0.0/mpn/x86_64/mod_1_2.asm gmp-6.0.0.fink/mpn/x86_64/mod_1_2.asm
--- gmp-6.0.0/mpn/x86_64/mod_1_2.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/mod_1_2.asm	2014-07-04 00:20:03.000000000 -0400
@@ -2,7 +2,7 @@
 
 dnl  Contributed to the GNU project by Torbjorn Granlund.
 
-dnl  Copyright 2009-2012 Free Software Foundation, Inc.
+dnl  Copyright 2009-2012, 2014 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -183,6 +183,7 @@
 	sal	R8(%rcx), %r12		C b << cnt
 IFSTD(`	mov	%r12, %rdi	')	C pass parameter
 IFDOS(`	mov	%r12, %rcx	')	C pass parameter
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_invert_limb)
 	mov	%r12, %r8
 	mov	%rax, %r11
diff -uNr gmp-6.0.0/mpn/x86_64/mod_1_4.asm gmp-6.0.0.fink/mpn/x86_64/mod_1_4.asm
--- gmp-6.0.0/mpn/x86_64/mod_1_4.asm	2014-03-25 10:37:55.000000000 -0400
+++ gmp-6.0.0.fink/mpn/x86_64/mod_1_4.asm	2014-07-04 00:20:03.000000000 -0400
@@ -2,7 +2,7 @@
 
 dnl  Contributed to the GNU project by Torbjorn Granlund.
 
-dnl  Copyright 2009-2012 Free Software Foundation, Inc.
+dnl  Copyright 2009-2012, 2014 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -190,6 +190,7 @@
 	sal	R8(%rcx), %r12		C b << cnt
 IFSTD(`	mov	%r12, %rdi	')	C pass parameter
 IFDOS(`	mov	%r12, %rcx	')	C pass parameter
+	ASSERT(nz, `test $15, %rsp')
 	CALL(	mpn_invert_limb)
 	mov	%r12, %r8
 	mov	%rax, %r11
