Closed XieJiSS closed 2 years ago
See also:
rust-lang/stdarch: https://github.com/rust-lang/stdarch/blob/7a41576c3f540ea96f70e6117e7ac3218c9b4367/crates/core_arch/src/riscv_shared/mod.rs#L10-L12
rust-lang/stdarch
Explanation of pause, fence w,0 and .insn: https://blog.jiejiss.com/Rust-is-incompatible-with-LLVM-at-least-partially/#pause-fence-and-.insn
pause
fence w,0
.insn
Note that this compiles on gcc 11.2.0 but not clang 13.0.1, and will compile on clang 14.0.0 (related commit: https://github.com/llvm/llvm-project/commit/283879793dc787225992496587581ec77b6b0610, tested on clang 14.0.0-rc1)
Thank you for your contribution.
See also:
rust-lang/stdarch
: https://github.com/rust-lang/stdarch/blob/7a41576c3f540ea96f70e6117e7ac3218c9b4367/crates/core_arch/src/riscv_shared/mod.rs#L10-L12Explanation of
pause
,fence w,0
and.insn
: https://blog.jiejiss.com/Rust-is-incompatible-with-LLVM-at-least-partially/#pause-fence-and-.insnNote that this compiles on gcc 11.2.0 but not clang 13.0.1, and will compile on clang 14.0.0 (related commit: https://github.com/llvm/llvm-project/commit/283879793dc787225992496587581ec77b6b0610, tested on clang 14.0.0-rc1)