Philipp Oppermann

Results 395 comments of Philipp Oppermann

> It seems buildable with naked functions and inline assembly. You only need to save the registers that are overwritten by called functions. The register selection happens in LLVM, so...

> Moreover, the calling convention would specify who needs to save and restore what registers anyway. But how can we implement this without LLVM support?

The issue with this approach is that you have to write the assembly for the prologue and epilogue yourself. This includes saving and restoring all registers (on many platforms). To...

I don't have any realistic use cases, but you can easily construct an example where the LLVM-generated code is much better: ```rust static TICKS: AtomicUsize = AtomicUsize::new(0); const THRESHOLD: usize...

> We certainly should consider "some sort of embedded use case" to be the primary use case with this sort of thing. In which case all register savings are a...

Hmm, you're right: . I still think that this implementation isn't a good idea, but I understand if you want to follow the implementation of the standard library. Maybe we...

> I think in the mean time it might be good to add some check in the build script that it’s being built for x86_64 (if that is even possible),...

Sounds like a reasonable feature, I'm happy to merge a PR for this.

> * Should we be implementing this for `VirtAddr`? Does it make sense to compare and address in the upper-half and lower-half? Should the range `lower_half_addr..upper_half_addr` be empty or ill...