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

MMX/SSE related functions #1169

Open
41 of 58 tasks
Torinde opened this issue Mar 28, 2024 · 5 comments
Open
41 of 58 tasks

MMX/SSE related functions #1169

Torinde opened this issue Mar 28, 2024 · 5 comments
Labels
instruction-set-support Implementing new SIMD ISA extensions portably

Comments

@Torinde
Copy link
Contributor

Torinde commented Mar 28, 2024

Per #1152 (comment) - listing those in case some of them are not yet implemented.

non-SIMD instructions related to:

MMX instructions introduced:

@mr-c mr-c added the instruction-set-support Implementing new SIMD ISA extensions portably label Mar 28, 2024
@mr-c
Copy link
Collaborator

mr-c commented Mar 28, 2024

Many of the rest are already implemented in SIMDe. I updated the table to add the intrinsic names next to the CPU instruction mnemonic.

@mr-c
Copy link
Collaborator

mr-c commented Mar 28, 2024

@Torinde Can you add the intrinsic/function name for the rest of the instructions? I'm seeing more of then as already implemented in SIMDe

Thanks for flagging these, we need to represent this status information better in our docs

@Torinde
Copy link
Contributor Author

Torinde commented Mar 28, 2024

Can you add the intrinsic/function name for the rest of the instructions? I'm seeing more of then as already implemented in SIMDe

How do you check?

@mr-c
Copy link
Collaborator

mr-c commented Mar 28, 2024

Can you add the intrinsic/function name for the rest of the instructions? I'm seeing more of then as already implemented in SIMDe

How do you check?

  1. Go to https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#
  2. Search for the instruction name: https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=MASKMOVQ
  3. If there are multiple hits, check them for a matching Instruction: line: https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=MASKMOVQ&ig_expand=4253_mm_maskmove_si64
  4. Check SIMDe source for the intrinsic:

    simde/simde/x86/sse.h

    Lines 2922 to 2942 in 517da84

    SIMDE_FUNCTION_ATTRIBUTES
    void
    simde_mm_maskmove_si64 (simde__m64 a, simde__m64 mask, int8_t* mem_addr) {
    #if defined(SIMDE_X86_SSE_NATIVE) && defined(SIMDE_X86_MMX_NATIVE)
    _mm_maskmove_si64(a, mask, HEDLEY_REINTERPRET_CAST(char*, mem_addr));
    #else
    simde__m64_private
    a_ = simde__m64_to_private(a),
    mask_ = simde__m64_to_private(mask);
    SIMDE_VECTORIZE
    for (size_t i = 0 ; i < (sizeof(a_.i8) / sizeof(a_.i8[0])) ; i++)
    if (mask_.i8[i] < 0)
    mem_addr[i] = a_.i8[i];
    #endif
    }
    #define simde_m_maskmovq(a, mask, mem_addr) simde_mm_maskmove_si64(a, mask, mem_addr)
    #if defined(SIMDE_X86_SSE_ENABLE_NATIVE_ALIASES)
    # define _mm_maskmove_si64(a, mask, mem_addr) simde_mm_maskmove_si64((a), (mask), SIMDE_CHECKED_REINTERPRET_CAST(int8_t*, char*, (mem_addr)))
    # define _m_maskmovq(a, mask, mem_addr) simde_mm_maskmove_si64((a), (mask), SIMDE_CHECKED_REINTERPRET_CAST(int8_t*, char*, (mem_addr)))
    #endif

Thanks!

@Torinde
Copy link
Contributor Author

Torinde commented Mar 28, 2024

Done - remaining instructions I don't find in Intel intrinsics list.

Most are implemented, only 14 "related" ones aren't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
instruction-set-support Implementing new SIMD ISA extensions portably
Projects
None yet
Development

No branches or pull requests

2 participants