Skip to content

Add MCST Elbrus support - #4730

Open
a1batross wants to merge 1 commit into
facebook:devfrom
a1batross:e2k-support
Open

Add MCST Elbrus support#4730
a1batross wants to merge 1 commit into
facebook:devfrom
a1batross:e2k-support

Conversation

@a1batross

Copy link
Copy Markdown
  • Adds MCST Elbrus (e2k) support to zstd. Specifically:
    • adds __e2k__ to the 64-bit platform detection in programs/platform.h
    • enables direct unaligned memory access, since the CPU handles unaligned loads efficiently
    • uses e2k builtins for 32/64-bit rotates and the XXH64 round in xxhash
    • adds __e2k__ to the 64-bit arch check in BIT_getLowerBits: the MCST lcc compiler emulates x86 intrinsics and defines __BMI2__ - without this change the build hits the DEBUG_STATIC_ASSERT in the 32-bit _bzhi_u32 branch;
  • Elbrus is a VLIW/EPIC architecture developed by Moscow Center of SPARC Technologies.
  • Both make check and make test pass on both x86 and my personal e2k-v3 and e2k-v5 machines.
  • To run make test with the MCST lcc compiler, -Wno-error=sign-compare is required due to its stricter sign-compare diagnostics: the warnings only affect asserts, not real code.

@meta-cla meta-cla Bot added the CLA Signed label Aug 7, 2026
@r-a-sattarov

Copy link
Copy Markdown

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants