From 91e5bd87e6ef2a3320bf610cb7cc2e2d64d7606f Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 7 Oct 2023 11:14:10 +0000 Subject: [PATCH] Skip cpuid shim when inline asm support is enabled cg_clif should support enough simd intrinsics now to not need almost all cpu features to be force disabled. In addition they can't be disabled anyway when using a sysroot compiled by LLVM. --- src/inline_asm.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/inline_asm.rs b/src/inline_asm.rs index a993c5edab19..dd2127d554dd 100644 --- a/src/inline_asm.rs +++ b/src/inline_asm.rs @@ -44,7 +44,9 @@ pub(crate) fn codegen_inline_asm<'tcx>( ) { // FIXME add .eh_frame unwind info directives - if !template.is_empty() { + if !template.is_empty() + && (cfg!(not(feature = "inline_asm")) || fx.tcx.sess.target.is_like_windows) + { // Used by panic_abort if template[0] == InlineAsmTemplatePiece::String("int $$0x29".to_string()) { fx.bcx.ins().trap(TrapCode::User(1));