Skip to content

Commit 91e5bd8

Browse files
committed
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.
1 parent 07147f3 commit 91e5bd8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/inline_asm.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ pub(crate) fn codegen_inline_asm<'tcx>(
4444
) {
4545
// FIXME add .eh_frame unwind info directives
4646

47-
if !template.is_empty() {
47+
if !template.is_empty()
48+
&& (cfg!(not(feature = "inline_asm")) || fx.tcx.sess.target.is_like_windows)
49+
{
4850
// Used by panic_abort
4951
if template[0] == InlineAsmTemplatePiece::String("int $$0x29".to_string()) {
5052
fx.bcx.ins().trap(TrapCode::User(1));

0 commit comments

Comments
 (0)