-
Notifications
You must be signed in to change notification settings - Fork 109
Closed
Labels
A-core-archArea: Necessary for full core::arch supportArea: Necessary for full core::arch support
Description
Running RUSTFLAGS="-Zcodegen-backend=cranelift" cargo miri test
on the following test trips up Miri.
#[test]
fn f() {
std::hint::spin_loop();
}
$ RUSTFLAGS="-Zcodegen-backend=cranelift" cargo miri test
test f ... error: Undefined Behavior: attempted to call intrinsic `llvm.x86.sse2.pause` that requires missing target feature sse2
--> /home/timo/.rustup/toolchains/nightly-2023-12-16-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs:25:5
|
25 | pause()
| ^^^^^^^ attempted to call intrinsic `llvm.x86.sse2.pause` that requires missing target feature sse2
I'm guessing the problem is this FIXME here?
rustc_codegen_cranelift/src/lib.rs
Lines 191 to 193 in 289a274
fn target_features(&self, _sess: &Session, _allow_unstable: bool) -> Vec<rustc_span::Symbol> { | |
vec![] // FIXME necessary for #[cfg(target_feature] | |
} |
spin_loop
has a #[cfg(target_arch = "x86_64")]
(which evaluates to true
) in which it executes an sse2 instruction
Metadata
Metadata
Assignees
Labels
A-core-archArea: Necessary for full core::arch supportArea: Necessary for full core::arch support