File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ pub unsafe extern "C" fn __rust_probestack() {
53
53
// The ABI here is that the stack frame size is located in `%eax`. Upon
54
54
// return we're not supposed to modify `%esp` or `%eax`.
55
55
asm ! ( "
56
+ pushq %rbp
57
+ movq %rsp, %rbp
58
+
56
59
mov %rax,%r11 // duplicate %rax as we're clobbering %r11
57
60
58
61
// Main loop, taken in one page increments. We're decrementing rsp by
@@ -89,6 +92,7 @@ pub unsafe extern "C" fn __rust_probestack() {
89
92
// return.
90
93
add %rax,%rsp
91
94
95
+ leave
92
96
ret
93
97
" :: : "memory" : "volatile" ) ;
94
98
:: core:: intrinsics:: unreachable ( ) ;
@@ -104,6 +108,8 @@ pub unsafe extern "C" fn __rust_probestack() {
104
108
//
105
109
// The ABI here is the same as x86_64, except everything is 32-bits large.
106
110
asm ! ( "
111
+ push %ebp
112
+ mov %esp, %ebp
107
113
push %ecx
108
114
mov %eax,%ecx
109
115
@@ -122,6 +128,7 @@ pub unsafe extern "C" fn __rust_probestack() {
122
128
123
129
add %eax,%esp
124
130
pop %ecx
131
+ leave
125
132
ret
126
133
" :: : "memory" : "volatile" ) ;
127
134
:: core:: intrinsics:: unreachable ( ) ;
You can’t perform that action at this time.
0 commit comments