Thanks to visit codestin.com
Credit goes to github.com

Skip to content

arm: provide emulation for SLJIT_CTZ in ARMv6#187

Merged
zherczeg merged 1 commit intozherczeg:masterfrom
carenas:test85
Aug 23, 2023
Merged

arm: provide emulation for SLJIT_CTZ in ARMv6#187
zherczeg merged 1 commit intozherczeg:masterfrom
carenas:test85

Conversation

@carenas
Copy link
Contributor

@carenas carenas commented Aug 21, 2023

Avoids SIGILL when running in older CPUs than armv7 (ex: Raspberry PI < 2)

Tested with QEMU using a softfp userland, but would work as well with hardfp (FPU is optional but common with those CPUs, even if it is not NEON).

Thumb2 with march=armv6t2 not addressed yet

Copy link
Owner

@zherczeg zherczeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a code for this when armv5 support was removed, maybe it can be restored.

@carenas carenas marked this pull request as draft August 22, 2023 17:12
Since 3499aba (Set armv6 as the minimum arm version, 2023-04-07)
the fallback code in use for ARMv5 was removed, but the RBIT
instruction is not supported in ARMv6 so bring it back.

A similar problem in the Thumb2 code is suspected as it should
affect at least armv6t2 but a solution for it has been punted.
@carenas carenas marked this pull request as ready for review August 22, 2023 17:26
@carenas carenas requested a review from zherczeg August 22, 2023 17:30
Copy link
Owner

@zherczeg zherczeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zherczeg zherczeg merged commit 108a4b4 into zherczeg:master Aug 23, 2023
@zherczeg
Copy link
Owner

According to my documentation, RBIT is ARMv6T2, ARMv7 instruction, so Thumb code should not be affected.

@carenas carenas deleted the test85 branch August 23, 2023 07:41
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