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

loongarch: Add SLJIT_UPPER_BITS_SIGN_EXTENDED #276

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

lrzlin
Copy link
Contributor

@lrzlin lrzlin commented Nov 19, 2024

Notice that in LoongArch V1.1 (LA664 and later), the SLJIT_UPPER_BITS_IGNORED should also be true, however due to a micro-architecture bug, 3A5000 (LA464) will needs the upper 32 bits of source register is sign extended while doing 32 bits division (e.g. div.w), otherwise it will output garbage result.

See: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html Chapter 1.5.1 Item 7
Also: https://areweloongyet.com/newsletter/this-week-in-loongarch-22 (Chinese Only)

Done: #232

Notice that in LoongArch V1.1 (LA664 and later), the
SLJIT_UPPER_BITS_IGNORED should also be true, however due to a
micro-architecture bug, 3A5000 (LA464) will needs the upper 32
bits of source register is sign extended while doing 32 bits
division (e.g. div.w), otherwise it will output garbage result.

See: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html
Chapter 1.5.1 Item 7
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, thank you

@zherczeg zherczeg merged commit 9dc3a4c into zherczeg:master Nov 19, 2024
11 checks passed
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