Amanieu / corosensei

A fast and safe implementation of stackful coroutines in Rust
Apache License 2.0
170 stars 13 forks source link

Support for PPC64le #18

Open Richard-Rogalski opened 1 year ago

Richard-Rogalski commented 1 year ago

Hello!

I'd like to get this working on PPC64. I tried getting something going, but all I get is this:

error[E0658]: inline assembly is not stable yet on this architecture
error: `clobber_abi` is not supported on this target

Looking at the loong PR, there's a way to to use the unstable inline assembly, but what about this clobber_abi thing? This has "only clobbers" under ppc, which makes me think it should work?

Also, would endianness matter here? I mostly want support for PPC64le, but would the same code work for PPC64(be)?

Thanks for any help!!

Amanieu commented 1 year ago

clobber_abi is optional, it's just a way to avoid listing all possible registers as clobbers. However it would be nice to have support for it added in the Rust compiler. As you can see in https://github.com/rust-lang/rust/pull/111237, it's not too difficult.

Endianness does not matter here. For example, the ARM/AArch64 code works fine in either endianess.

rheaplex commented 5 months ago

@Richard-Rogalski heya did you get any further with this? 😺

ky438 commented 3 months ago

@Amanieu - this issue seems outstanding; I just ran into this with an attempted build of coronsense 0.1.3 on ppc64le (Ubuntu 22.04 LTS on POWER9)