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.
This commit is contained in:
bjorn3 2023-10-07 11:14:10 +00:00
parent 07147f34d0
commit 91e5bd87e6

View File

@ -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));