aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-05-29 13:50:54 +0100
committergingerBill <bill@gingerbill.org>2022-05-29 13:50:54 +0100
commit0ccbea17aa874b50dd943d83ff39c1e1270f4ea2 (patch)
treea3df78b6313e7ac47d20f7e86558da9b257b1a13
parentbabfba5e8fd7be50e394d426be2db07c477e538d (diff)
Add pclmulqdq.odin
-rw-r--r--core/simd/x86/pclmulqdq.odin13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/simd/x86/pclmulqdq.odin b/core/simd/x86/pclmulqdq.odin
new file mode 100644
index 000000000..94496fb04
--- /dev/null
+++ b/core/simd/x86/pclmulqdq.odin
@@ -0,0 +1,13 @@
+//+build i386, amd64
+package simd_x86
+
+_mm_clmulepi64_si128 :: #force_inline proc "c" (a, b: __m128i, $IMM8: u8) -> __m128i {
+ return pclmulqdq(a, b, u8(IMM8))
+}
+
+@(default_calling_convention="c")
+@(private)
+foreign _ {
+ @(link_name="llvm.x86.pclmulqdq")
+ pclmulqdq :: proc(a, round_key: __m128i, #const imm8: u8) -> __m128i ---
+} \ No newline at end of file