Skip to content

Commit 0a35232

Browse files
committed
Implement all vendor intrinsics used by the httparse crate
1 parent 61e38ce commit 0a35232

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: src/intrinsics/llvm_x86.rs

+10
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ pub(crate) fn codegen_x86_llvm_intrinsic_call<'tcx>(
2727
crate::inline_asm::codegen_xgetbv(fx, xcr_no, ret);
2828
}
2929

30+
"llvm.x86.sse3.ldu.dq" | "llvm.x86.avx.ldu.dq.256" => {
31+
// https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_lddqu_si128&ig_expand=4009
32+
// https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_lddqu_si256&ig_expand=4010
33+
intrinsic_args!(fx, args => (ptr); intrinsic);
34+
35+
// FIXME correctly handle unalignedness
36+
let val = CValue::by_ref(Pointer::new(ptr.load_scalar(fx)), ret.layout());
37+
ret.write_cvalue(fx, val);
38+
}
39+
3040
"llvm.x86.sse.cmp.ps" | "llvm.x86.sse2.cmp.pd" => {
3141
let (x, y, kind) = match args {
3242
[x, y, kind] => (x, y, kind),

0 commit comments

Comments
 (0)