Stabilize asm! and global_asm!#91728
Conversation
|
Some changes occured to rustc_codegen_gcc cc @antoyo |
|
Cargo.lock
Outdated
There was a problem hiding this comment.
In case anyone's wondering: yes, I made a typo when publishing a new version of compiler-builtins.
|
Would it make sense to leave the macro in the prelude unstably for easier migration? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
src/test/assembly/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs
Outdated
Show resolved
Hide resolved
|
I just posted a set of review comments; with all of those addressed, r=me. |
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #91799) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@bors r=joshtriplett |
|
📌 Commit 9af1f7d550300b5459fa6c4b8d6213f3003e15cf has been approved by |
|
☔ The latest upstream changes (presumably #91813) made this pull request unmergeable. Please resolve the merge conflicts. |
`asm!` was removed from the prelude when it was stabilized. <rust-lang/rust#91728>
The `asm` feature has been stabilized by <rust-lang/rust#91728>, which also removes `[global_]asm!` from the prelude.
The `asm` feature has been stabilized by <rust-lang/rust#91728>, which also removed `[global_]asm!` from the prelude.
372: asm/inline: explicitly use asm macro r=adamgreig a=jordens `asm!()` removed from prelude in current nightly rust-lang/rust#91728 close #371 This is also a good candidate for the cortex-m v0.7 series. Co-authored-by: Robert Jördens <rj@quartiq.de> Co-authored-by: Adam Greig <adam@adamgreig.com>
These features are now stable, as of the 19th of December! See rust-lang/rust#91728
`asm` macro was removed from stdlib prelude in 1.59 See rust-lang/rust#91728
|
This seems likely to be noise as a result of the issue tracked in rust-lang/rustc-perf#1126 -- marking as triaged, not something we should address directly. @rustbot label +perf-regression-triaged |
|
[x86_64, AVX512] Reason I bring this up is mainly to do with the exclusion of AVX512VL. The VL set extends the foundation set (and most other sets) to be able to operate on both XMM and YMM registers, allowing for much cleaner implementations as well as faster overall code. The reason for wanting this functionality is due the lower latency of certain AVX and AVX2 instructions that can only operate on xmm registers, but wanting the more modern and advanced instructions available under AVX512. For example, as of now if we wanted to do a fuse multiply add on a group of 4 packed singles without avx512VL we'd have to do something along the lines of
The VL set of extensions allows us to use AVX512 instructions directly on xmm and ymm registers, removing the need for copying back and forth between AVX1/2 registers and AVX512 registers. This is also relevant not only because of the latency cost, but also because they may find themselves on different ports of the CPU core itself, slowing us down further. The above would become:
|
Tracking issue: #72016
It's been almost 2 years since the original RFC was posted and we're finally ready to stabilize this feature!
The main changes in this PR are:
asm!andglobal_asm!from the prelude as per the decision in Decide whetherasm!and/orglobal_asm!should be exported from the prelude. #87228.asmandglobal_asmfeatures.asmandglobal_asm. The contents are moved to the reference and rust by example.llvm_asm!instead ofasm!if you're still using the old syntax, since it doesn't work anymore withasm!no longer being in the prelude. This only affects code that predates the old LLVM-styleasm!being renamed tollvm_asm!.stdarchandcompiler-builtins.r? @joshtriplett