Unam3dd/Etheria-std

[FEAT] ๐Ÿš€ Write Memory Functions for Etheria Standard Project

Unam3dd opened this issue ยท 0 comments

Description

This library is used in Etheria Disassembler.
The Etheria Standard project aims to be a robust and independent without dependencies on the standard C library.
This issue targets rewriting core memory functions to ensure they are optimized for various CPU architectures and extensions.
The functions will be recoded in C or assembly, with aligned and unaligned versions, with and without ERMS support.
An IFUNC resolver will be implemented for each function to determine the most performant version at runtime determinated by the runtime CPU, using the CPUID x86 inline assembly instruction to identify extensions of the CPU.

Setup MCA (Machine Code Analyzer)

  • MCA
  • Create github actions container for LLVM Machine Code Analyzer.
  • Create github actions container for LLVM exegis

Tasks

Memory Functions

  • memcpy Implementation

    • memcpy_naive
    • memcpy_erms
    • memcpy_evex_unaligned
    • memcpy_evex_unaligned_erms
    • memcpy_avx_unaligned_erms_rtm
    • memcpy_sse2_unaligned_erms
    • memcpy_sse2_unaligned
    • memcpy_avx512_unaligned
    • memcpy_avx512_unaligned_erms
    • memcpy_ifunc
  • memmove Implementation

    • memmove_naive
    • memmove_avx_unaligned_rtm
    • memmove_avx_unaligned
    • memmove_avx_unaligned_erms
    • memmove_ssse3
    • memmove_avx512_no_vzeroupper
    • memmove_ifunc
  • memcmp Implementation

    • memcmp_naive
    • memcmp_sse2
    • memcmp_avx2_movbe
    • memcmp_avx2_movbe_rtm
    • memcmp_evex_movbe
    • memcmp_ifunc
  • memchr Implementation

    • memchr_naive
    • memchr_avx2
    • memchr_avx2_rtm
    • memchr_evex
    • memchr_evex_rtm
    • memchr_sse2
    • memchr_ifunc
  • memccpy Implementation

    • memccpy_naive
    • memccpy_ifunc
  • memset Implementation

    • memset_naive
    • memset_avx2_unaligned
    • memset_avx2_unaligned_erms
    • memset_avx2_unaligned_erms_rtm
    • memset_avx2_unaligned_rtm
    • memset_avx512_no_vzeroupper
    • memset_avx512_unaligned
    • memset_avx512_unaligned_erms
    • memset_erms
    • memset_evex_unaligned
    • memset_evex_unaligned_erms
    • memset_sse2_unaligned
    • memset_sse2_unaligned_erms
    • memset_ifunc
  • memmem Implementation

    • memmem_naive
    • memmem_ifunc
  • memrchr Implementation

    • memrchr_naive
    • memrchr_sse2
    • memrchr_evex
    • memrchr_avx2_rtm
    • memrchr_avx2
    • memrchr_ifunc
  • mempcpy Implementation

    • mempcpy_naive
    • mempcpy_erms
    • mempcpy_evex_unaligned
    • mempcpy_evex_unaligned_erms
    • mempcpy_avx_unaligned_rtm
    • mempcpy_avx_unaligned_erms_rtm
    • mempcpy_avx_unaligned
    • mempcpy_avx_unaligned_erms
    • mempcpy_ssse3
    • mempcpy_sse2_unaligned_erms
    • mempcpy_sse2_unaligned
    • mempcpy_avx512_no_vzeroupper
    • mempcpy_avx512_unaligned
    • mempcpy_avx512_unaligned_erms
    • mempcpy_ifunc

Milestones

  • Milestone 1: Complete implementation and testing of all memory functions.
  • Milestone 2: Integrate all memory functions into the Etheria Standard library.
  • Milestone 3: Document each memory function and its implementation details.
  • Milestone 4: Set up automated testing and benchmarking for continuous improvement.

Priority

High

Labels

  • enhancement
  • optimization
  • memory
  • C
  • assembly
  • documentation
  • testing

Additional Notes

  • Ensure all code adheres to the project's coding standards and guidelines.
  • Collaborate with other team members to review and improve implementations.
  • Keep the project repository updated with progress and any changes made.