[syslinux:wip.makefixes] __muldi3.S: fix double pop!

syslinux-bot for H. Peter Anvin (Intel) hpa at zytor.com
Wed Feb 27 17:30:06 PST 2019


Commit-ID:  d0feb1cc4f7cb43cfda94bfc57553845bcc12df7
Gitweb:     https://www.syslinux.org/commit/d0feb1cc4f7cb43cfda94bfc57553845bcc12df7
Author:     H. Peter Anvin (Intel) <hpa at zytor.com>
AuthorDate: Wed, 27 Feb 2019 17:28:41 -0800
Committer:  H. Peter Anvin (Intel) <hpa at zytor.com>
CommitDate: Wed, 27 Feb 2019 17:28:41 -0800

__muldi3.S: fix double pop!

One register would be popped twice - it is good that this never
actually got used anywhere (newer gcc's don't seem to need it, at
least not in most cases.)

Signed-off-by: H. Peter Anvin (Intel) <hpa at zytor.com>

---
 com32/lib/i386/libgcc/__muldi3.S | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/com32/lib/i386/libgcc/__muldi3.S b/com32/lib/i386/libgcc/__muldi3.S
index 80e31d43..32733007 100644
--- a/com32/lib/i386/libgcc/__muldi3.S
+++ b/com32/lib/i386/libgcc/__muldi3.S
@@ -11,15 +11,13 @@
 __muldi3:
 	/* i386 */
 	push  %esi
-	movl  8(%esp),%ecx
-	movl  %eax,%esi
-	push  %edx
-	mull  %ecx
-	imull 12(%esp),%esi
-	addl  %esi,%edx
-	pop   %esi
-	imull %esi,%ecx
-	addl  %ecx,%edx
+	movl   8(%esp),%esi
+	movl  12(%esp),%ecx
+	imul  %esi,%edx
+	imul  %eax,%ecx
+	add   %edx,%ecx
+	mul   %esi
 	pop   %esi
+	add   %ecx,%edx
 	ret
 	.size __muldi3,.-__muldi3


More information about the Syslinux-commits mailing list