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

add SLJIT_REV16PACK and SLJIT_REV32PACK #206

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carenas
Copy link
Contributor

@carenas carenas commented Sep 18, 2023

Might become useful when byte swapping in bulk and therefore as it is meant to be performance sensitive, not Including (at least for now) emulation.

Not particularly fond of he name, but at least keeps the bit width of the instruction away from the bit width of the register size, even if a mouthful as SLJIT_REV16PACK32

Including implementations without emulation for ARM, MIPS and
LoongArch.

Allow 16/32bit bswap in a packed integer, so it could provide
faster results by doing 2 or 4 operations at once.

While at it add an instruction to ARM 32bit to make things
slightly more efficient and do some refactoring on related
test cases.
@zherczeg
Copy link
Owner

Is there a use case for this? When I was thinking about this before, I decided not to do it until the support needed for something. For example, the normal rev is needed for big-endian WebAssembly support, since WebAssembly must use little endian memory accesses.

@carenas
Copy link
Contributor Author

carenas commented Sep 20, 2023

Is there a use case for this?

no, was more interested on feedback on the design and code, as well as the potential performance improvements if bulk bswaps were needed as well as if it was worth doing it here or going all the way to vector instructions (most likely the later which seems to be well supported at least in s390x).

@carenas carenas marked this pull request as draft July 17, 2024 07:04
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