File tree Expand file tree Collapse file tree 6 files changed +36
-6
lines changed
crates/fiber/src/stackswitch Expand file tree Collapse file tree 6 files changed +36
-6
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,13 @@ cfg_if::cfg_if! {
3636 }
3737}
3838
39+ #[ inline( never) ] // FIXME(rust-lang/rust#148307)
40+ pub ( crate ) unsafe extern "C" fn wasmtime_fiber_switch ( top_of_stack : * mut u8 ) {
41+ unsafe { wasmtime_fiber_switch_ ( top_of_stack) }
42+ }
43+
3944#[ unsafe( naked) ]
40- pub ( crate ) unsafe extern "C" fn wasmtime_fiber_switch ( top_of_stack : * mut u8 /* x0 */ ) {
45+ unsafe extern "C" fn wasmtime_fiber_switch_ ( top_of_stack : * mut u8 /* x0 */ ) {
4146 naked_asm ! ( concat!(
4247 "
4348 .cfi_startproc
Original file line number Diff line number Diff line change 1010
1111use core:: arch:: naked_asm;
1212
13+ #[ inline( never) ] // FIXME(rust-lang/rust#148307)
14+ pub ( crate ) unsafe extern "C" fn wasmtime_fiber_switch ( top_of_stack : * mut u8 ) {
15+ unsafe { wasmtime_fiber_switch_ ( top_of_stack) }
16+ }
17+
1318#[ unsafe( naked) ]
14- pub ( crate ) unsafe extern "C" fn wasmtime_fiber_switch ( top_of_stack : * mut u8 /* r0 */ ) {
19+ unsafe extern "C" fn wasmtime_fiber_switch_ ( top_of_stack : * mut u8 /* r0 */ ) {
1520 naked_asm ! (
1621 "
1722 // Save callee-saved registers
Original file line number Diff line number Diff line change 77
88use core:: arch:: naked_asm;
99
10+ #[ inline( never) ] // FIXME(rust-lang/rust#148307)
11+ pub ( crate ) unsafe extern "C" fn wasmtime_fiber_switch ( top_of_stack : * mut u8 ) {
12+ unsafe { wasmtime_fiber_switch_ ( top_of_stack) }
13+ }
14+
1015#[ unsafe( naked) ]
11- pub ( crate ) unsafe extern "C" fn wasmtime_fiber_switch ( top_of_stack : * mut u8 /* a0 */ ) {
16+ unsafe extern "C" fn wasmtime_fiber_switch_ ( top_of_stack : * mut u8 /* a0 */ ) {
1217 naked_asm ! (
1318 "
1419 // See https://github.com/rust-lang/rust/issues/80608.
Original file line number Diff line number Diff line change 77
88use core:: arch:: naked_asm;
99
10+ #[ inline( never) ] // FIXME(rust-lang/rust#148307)
11+ pub ( crate ) unsafe extern "C" fn wasmtime_fiber_switch ( top_of_stack : * mut u8 ) {
12+ unsafe { wasmtime_fiber_switch_ ( top_of_stack) }
13+ }
14+
1015#[ unsafe( naked) ]
11- pub ( crate ) unsafe extern "C" fn wasmtime_fiber_switch ( top_of_stack : * mut u8 /* x0 */ ) {
16+ unsafe extern "C" fn wasmtime_fiber_switch_ ( top_of_stack : * mut u8 /* x0 */ ) {
1217 naked_asm ! (
1318 "
1419 // Save all callee-saved registers on the stack since we're assuming
Original file line number Diff line number Diff line change 1212
1313use core:: arch:: naked_asm;
1414
15- #[ unsafe ( naked ) ]
15+ #[ inline ( never ) ] // FIXME(rust-lang/rust#148307)
1616pub ( crate ) unsafe extern "C" fn wasmtime_fiber_switch ( top_of_stack : * mut u8 ) {
17+ unsafe { wasmtime_fiber_switch_ ( top_of_stack) }
18+ }
19+
20+ #[ unsafe( naked) ]
21+ unsafe extern "C" fn wasmtime_fiber_switch_ ( top_of_stack : * mut u8 ) {
1722 naked_asm ! (
1823 "
1924 // Load our stack-to-use
Original file line number Diff line number Diff line change 77
88use core:: arch:: naked_asm;
99
10+ #[ inline( never) ] // FIXME(rust-lang/rust#148307)
11+ pub ( crate ) unsafe extern "C" fn wasmtime_fiber_switch ( top_of_stack : * mut u8 ) {
12+ unsafe { wasmtime_fiber_switch_ ( top_of_stack) }
13+ }
14+
1015#[ unsafe( naked) ]
11- pub ( crate ) unsafe extern "C" fn wasmtime_fiber_switch ( top_of_stack : * mut u8 /* rdi */ ) {
16+ unsafe extern "C" fn wasmtime_fiber_switch_ ( top_of_stack : * mut u8 /* rdi */ ) {
1217 naked_asm ! (
1318 "
1419 // We're switching to arbitrary code somewhere else, so pessimistically
You can’t perform that action at this time.
0 commit comments