We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aef31cb commit 8cad29aCopy full SHA for 8cad29a
src/intrinsics/llvm_x86.rs
@@ -18,6 +18,20 @@ pub(crate) fn codegen_x86_llvm_intrinsic_call<'tcx>(
18
// Spin loop hint
19
}
20
21
+ // Used by is_x86_feature_detected!();
22
+ "llvm.x86.xgetbv" => {
23
+ // FIXME use the actual xgetbv instruction
24
+ intrinsic_args!(fx, args => (v); intrinsic);
25
+
26
+ let v = v.load_scalar(fx);
27
28
+ // As of writing on XCR0 exists
29
+ fx.bcx.ins().trapnz(v, TrapCode::UnreachableCodeReached);
30
31
+ let res = fx.bcx.ins().iconst(types::I64, 1 /* bit 0 must be set */);
32
+ ret.write_cvalue(fx, CValue::by_val(res, fx.layout_of(fx.tcx.types.i64)));
33
+ }
34
35
// Used by `_mm_movemask_epi8` and `_mm256_movemask_epi8`
36
"llvm.x86.sse2.pmovmskb.128"
37
| "llvm.x86.avx2.pmovmskb"
0 commit comments