#How to do `vpshufd` with `@Vector`?

1 messages · Page 1 of 1 (latest)

dense holly
#

I tried using a @shuffle call, but it didn't compile to pshufd so I think it does something different than what I want. The only reference to pshufd in Zig code I could find was in the AES crypto implementation in which they just used inline assembly. Is there any way to get Zig to generate this instruction without diving into assembly or using the intrinsics headers?

https://github.com/ziglang/zig/blob/f995c1b08ab72897cadbb6a365fb04afb8ea9ca1/lib/std/crypto/aes/aesni.zig#L188

GitHub

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software. - ziglang/zig

pure lion
#

What arguments are you passing to @shuffle?