You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, C++ compilers like to make set_registers into a tail call, which causes problems when get_registers returns the second time. To get around this, we should write the swap context function in assembly instead of disabling compiler optimizations.
Could you write it in LLVM bitcode instead? I think we're hoping to use as little assembly as possible, in order to make supporting different processor types easy.
My first thought was no, because swapping contexts needs direct access to the machine's registers. However, we already have set_registers and get_registers written in assembly, so we could probably write the swap function in LLVM.
If we do this, can we guarantee that LLVM won't turn the call to set_registers into a tail call like is happening in the C version?
Activity
marijnh commentedon Jun 23, 2011
Could you write it in LLVM bitcode instead? I think we're hoping to use as little assembly as possible, in order to make supporting different processor types easy.
eholk commentedon Jun 23, 2011
My first thought was no, because swapping contexts needs direct access to the machine's registers. However, we already have set_registers and get_registers written in assembly, so we could probably write the swap function in LLVM.
If we do this, can we guarantee that LLVM won't turn the call to set_registers into a tail call like is happening in the C version?
Auto merge of rust-lang#619 - gdf8gdn8:fixed-missing-epolloneshot-and…
PMPI recognition (rust-lang#548)
Merge rustc into rmc - 2021 week 40 (rust-lang#548)
Merge pull request rust-lang#548 from sapir/code-model
Merge pull request rust-lang#548 from betrusted-io/mem-intrinsics-on-…
Fix usize overflow (rust-lang#548)
Merge rust-lang#548
Merge pull request rust-lang#548 from Shnatsel/faster-avx2-swizzle