On x86 the following does not compile: ```rust #![feature(asm)] #[target_feature(enable="avx")] pub unsafe fn foo() { let mut x = 0; asm!("vmovaps {}, {}", lateout(ymm_reg) x, in(ymm_reg) x); } ``` ubt it does compile with `-Ctarget-feature=+avx` specified. Both should work? <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"asquared31415"}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->
Activity
nagisa commentedon Sep 26, 2021
I don't think this needs to block the stabilization of the feature, however. Enabling this allows more programs to compile, not fewer.
dobasy commentedon Oct 2, 2021
This compiles without attributes nor compiler options:
nagisa commentedon Oct 2, 2021
Clobbers don't require a target feature. See also https://zulip-archive.rust-lang.org/stream/216763-project-inline-asm/topic/register.20class.20feature.20checks.html
dobasy commentedon Oct 2, 2021
Isn't this clobber too?:
It doesn't compile.
asquared31415 commentedon Oct 7, 2021
@rustbot claim
asm
register classes #89641Rollup merge of rust-lang#89641 - asquared31415:asm-feature-attr-regs…