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

Portability fix-ups and generic chunk copy implementation. #51

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

sh1boot
Copy link

@sh1boot sh1boot commented Nov 1, 2023

This adds a platform-independent path for chunkcopy.h for cases where the compiler is able to insert practical inline memcpy idioms similar to the ones hand-written for x86 and NEON. Depending on the architecture, this may depend on some CFLAGS magic to enable SIMD or unaligned data accesses.

To test this on hardware which already has a dedicated chunk-copy implementation available, pass -DBUILD_GENERIC_CODE and -DFORCE_CHUNK_COPY to cmake.

Simon Hosie added 2 commits October 31, 2023 16:22
Generic paths for chunk ops and hash function.  Add a cmake option to
avoid hardware features so that the generic paths can be tested on x86.
Arguments which are uint64_t may be `%l` or `%ll` depending on target,
which can produce warnings even if they're the same size.  Using the
PRI*64 macros makes this portable.
@kornelski kornelski merged commit 9d370f5 into cloudflare:gcc.amd64 Nov 20, 2023
6 checks passed
@kornelski
Copy link

Thanks

@sh1boot
Copy link
Author

sh1boot commented Apr 7, 2024

Hi @kornelski,

This was intended to be the opener for a series of patches to improve RISC-V performance; but it got derailed and I've only recently been freed up to finish this off.

The next patch, which actually includes RISC-V-specific code and a few hints at configuring the build appropriately, is here:
#55

After that I have more specialised repipelining of the decoder, but I need to do more work to either isolate it from the x86 path or to make the x86 path see the same benefits as I got under RISC-V. That's something I still need to figure out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants