Skip to content

get rid of llvm_intrinsics.zig #2

@archaistvolts

Description

@archaistvolts

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions