File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ MORESTACK:
64
64
// NB: This can be called with the fastcc convention so we
65
65
// have to preserve any argument registers we want to use
66
66
67
+ // NB: __morestack is called misaligned by 4 bytes, i.e.
68
+ // subl $4, %esp would get us to a normal alignment
69
+
67
70
// FIXME (1226): main is compiled with the split-stack prologue,
68
71
// causing it to call __morestack, so we have to jump back out
69
72
subl $28 ,%esp
@@ -120,7 +123,9 @@ MORESTACK:
120
123
// Switch back to the rust stack
121
124
movl %ebp , %esp
122
125
123
- subl $8 , %esp // Alignment
126
+ // Remember that __morestack is called misaligned so %ebp
127
+ // is not aligned to a 16-byte boundary, these 4 bytes realign.
128
+ subl $4 , %esp
124
129
125
130
// Now that we're on the return path we want to avoid
126
131
// stomping on %eax. FIXME: Need to save and restore
@@ -137,7 +142,7 @@ MORESTACK:
137
142
pushl $0
138
143
call UPCALL_CALL_C
139
144
140
- addl $16 ,%esp
145
+ addl $12 ,%esp
141
146
142
147
popl %ebp
143
148
#if defined(__linux__) || defined(__APPLE__)
You can’t perform that action at this time.
0 commit comments