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

[RV64_DYNAREC] Removed some TABLE64 usage #2291

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Conversation

ksco
Copy link
Collaborator

@ksco ksco commented Jan 24, 2025

No description provided.

@ptitSeb
Copy link
Owner

ptitSeb commented Jan 24, 2025

Note that TABLE64 were reduce on ARM64 because, for an address in a 48bits address space, it takes up to 3 opcode (so 96 bytes) to directly load the adress, making the use of TABLE64 rarely usefull (unless the same address is used multiple time). Not sure the same reasoning happens here, especialy on RV64 where it might use more than 3 opcodes.

@ksco
Copy link
Collaborator Author

ksco commented Jan 24, 2025

Well, there is not that much of a difference in terms of code size, for a 48-bit address, it's 6 opcodes at max, and for a 39-bit address, it's 4 opcodes at max. But I decided to port this because TABLE64 in GETIP seems not to be working well with bigblock>0, for some unknown reasons.

@ptitSeb ptitSeb merged commit 3ec9507 into ptitSeb:main Jan 24, 2025
27 checks passed
@ksco ksco deleted the table64 branch January 24, 2025 15:03
@ksco
Copy link
Collaborator Author

ksco commented Jan 24, 2025

Also, for the GETIP part, with an extra scratch register, it’s possible to use LUI+ADDI for any 32bit offset, that will come later ;)

@ptitSeb
Copy link
Owner

ptitSeb commented Jan 24, 2025

Also, for the GETIP part, with an extra scratch register, it’s possible to use AUIPC+ADDI for any 32bit offset, that will come later ;)

You will probably not be able to use that, I think. First because it's a 32bits offset between x86 and rv64 PC, which is unlikely (well, on 39bits address space, it's less unlikly of couse). Second, and more importan: because the RV64 address is only known in PASS3, making it difficult to use this in PASS2 without creating difference between those 2 passes.

@ksco
Copy link
Collaborator Author

ksco commented Jan 24, 2025

Sorry, I meant LUI, not AUIPC

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