facebook / facebook/zstd

[Huffman Assembly] Expand supported platforms

Đang mở
#2,789 11 bình luận 2 reaction 1 người được giao Được @terrelln nhận Xem trên GitHub
help wanted long-term
Ngôn ngữ chính
C
Star
27.9k
Fork
2.6k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
8

Mô tả

The x86-64 Huffman assembly implementation is currently allow-listed to work on:
* Linux: `defined(__linux__) || defined(__linux)`
* MacOS: `defined(__APPLE__)`

The macro to check this is `HUF_ASM_SUPPORTED` defined in `huf_decompress.c`.

I've selected a very restricted set of platforms because I want to be sure that it is well tested before enabling it. Any platform that shares a calling convention with Linux should just work, but I want to be cautious of details, like working with interrupt handlers & debuggers. It should be easy to add BSD to this list, if someone wants to test that everything works as expected.

The assembly currently doesn't work on Windows because it has a different calling convention. And I had a really hard time getting the detection macros right. So if someone wants to take that on, that would be great.

Tasks:
* [ ] Test and enable support for x86-64 assembly on BSD.
* [ ] Add support for Windows in the x86-64 assembly & enable assembly in the Visual Studios build.
* [ ] Add support for assembly in the amalgamated build (`build/single_file_libs`). Probably by translating the `.S` file into inline assembly.
* [ ] Add an aarch64 assembly implementation.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.