Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get rid of llvm_intrinsics.zig #2

Open
2 of 10 tasks
travisstaloch opened this issue Aug 26, 2021 · 0 comments
Open
2 of 10 tasks

get rid of llvm_intrinsics.zig #2

travisstaloch opened this issue Aug 26, 2021 · 0 comments

Comments

@travisstaloch
Copy link
Owner

travisstaloch commented Aug 26, 2021

convert all of the hacks found here and here to zig builtin calls. this will hopefully make it possible to build on mac and other platforms and close #1.

  1. try to use existing zig intrinsics if possible
  2. work toward implementing them in the zig compiler
  • saturating arithmetic - saturating arithmetic builtins: add, sub, mul, shl ziglang/zig#9619
  • carrylessMu()l (llvm.x86.pclmulqdq)
  • shuffleEpi8() (llvm.x86.avx2.pshuf.b)
  • shuffleEpi32() (llvm.x86.ssse3.pshuf.b.128)
  • vpalignr() (llvm.x86.vpalignr)
  • _mm256_movemask_epi8() (llvm.x86.avx2.pmovmskb)
  • _mm_maddubs_epi16() (llvm.x86.ssse3.pmadd.ub.sw.128)
  • _mm_madd_epi16() (llvm.x86.sse2.pmadd.wd)
  • _mm_packus_epi32() (llvm.x86.sse41.packusdw)
  • _prevN()
    • converted to @shuffle instruction in aarch64 branch
@travisstaloch travisstaloch changed the title say goodbye to llvm_intrinsics.zig get rid of llvm_intrinsics.zig Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant