Skip to content

Commit b4ef2e0

Browse files
committed
---
yaml --- r: 6854 b: refs/heads/master c: c3569ab h: refs/heads/master v: v3
1 parent 7fc8314 commit b4ef2e0

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: d2e7336a01f1515564a32ecb5a6368ce10088c33
2+
refs/heads/master: c3569abb8c7f81e521bc6002b351c3b4fbfcce4c

trunk/src/rt/arch/i386/morestack.S

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ MORESTACK:
144144
// NB: __morestack is called misaligned by 4 bytes, i.e.
145145
// subl $4, %esp would get us to a normal alignment
146146

147-
subl $44,%esp
147+
subl $28,%esp
148148

149149
// Save fastcc arguments
150-
movl %ecx, 28(%esp)
151-
movl %edx, 24(%esp)
150+
movl %ecx, 16(%esp)
151+
movl %edx, 12(%esp)
152152

153153
// FIXME (1226): main is compiled with the split-stack prologue,
154154
// causing it to call __morestack, so we have to jump back out
@@ -160,14 +160,14 @@ MORESTACK:
160160

161161
// The size of the stack arguments to copy to the new stack,
162162
// ane of the the arguments to __morestack
163-
movl 56(%esp),%eax
163+
movl 40(%esp),%eax
164164
movl %eax,8(%esp)
165165
// The address of the stack arguments to the original function
166-
leal 64(%esp),%eax
166+
leal 48(%esp),%eax
167167
movl %eax,4(%esp)
168168
// The amount of stack needed for the original function,
169169
// the other argument to __morestack
170-
movl 52(%esp),%eax // The amount of stack needed
170+
movl 36(%esp),%eax // The amount of stack needed
171171
movl %eax,(%esp)
172172

173173
call UPCALL_NEW_STACK
@@ -176,13 +176,13 @@ MORESTACK:
176176
movl %eax, (%esp)
177177

178178
// Grab the __morestack return pointer
179-
movl 48(%esp),%eax
179+
movl 32(%esp),%eax
180180
// Skip past the ret instruction in the parent fn
181181
inc %eax
182182

183183
// Restore the fastcc arguments to the original function
184-
movl 28(%esp), %ecx
185-
movl 24(%esp), %edx
184+
movl 16(%esp), %ecx
185+
movl 12(%esp), %edx
186186

187187
// Switch stacks
188188
movl (%esp),%esp

0 commit comments

Comments
 (0)