about summary refs log tree commit diff
path: root/sysdeps/i386/addmul_1.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/addmul_1.S')
-rw-r--r--sysdeps/i386/addmul_1.S55
1 files changed, 29 insertions, 26 deletions
diff --git a/sysdeps/i386/addmul_1.S b/sysdeps/i386/addmul_1.S
index 50151ea07d..a5d3fb0539 100644
--- a/sysdeps/i386/addmul_1.S
+++ b/sysdeps/i386/addmul_1.S
@@ -35,38 +35,41 @@
 
 	.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)