aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-02-27 17:13:14 -0800
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-02-27 17:14:36 -0800
commitfdb3840f1de8b57a17621c3299a75db7ddcbf977 (patch)
treed3740bf1b2bde50f68a5987d882537ebc9fd062d
parent0fe62bb555ca64873e3d7fde45c7850dabaf0d59 (diff)
downloadsyslinux-fdb3840f1de8b57a17621c3299a75db7ddcbf977.tar.gz
syslinux-fdb3840f1de8b57a17621c3299a75db7ddcbf977.tar.xz
syslinux-fdb3840f1de8b57a17621c3299a75db7ddcbf977.zip
__muldi3: gcc doesn't split a 64-bit argument between reg and mem
If a 64-bit value can't fit in the argument registers, it is passed entirely on the stack. Thus we have one value in %edx:%eax and one value in [8:4](%esp); we then save a single register so the stack frame offset has to be adjusted by an additional 4 bytes. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-rw-r--r--com32/lib/i386/libgcc/__muldi3.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/com32/lib/i386/libgcc/__muldi3.S b/com32/lib/i386/libgcc/__muldi3.S
index 5f0da638..80e31d43 100644
--- a/com32/lib/i386/libgcc/__muldi3.S
+++ b/com32/lib/i386/libgcc/__muldi3.S
@@ -11,10 +11,11 @@
__muldi3:
/* i386 */
push %esi
+ movl 8(%esp),%ecx
movl %eax,%esi
push %edx
mull %ecx
- imull 8(%esp),%esi
+ imull 12(%esp),%esi
addl %esi,%edx
pop %esi
imull %esi,%ecx