Skip to content

Add initial specification for Big Endian #470

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

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

Conversation

djtodoro
Copy link

@djtodoro djtodoro commented Jul 1, 2025

GNU GCC Toolchain already supports big endian for RISC-V target. That support was merged without a change in psABI Document.
Here [0] is the initial PR for adding big endian support in LLVM project, so lets implement documentation part as well.

[0] llvm/llvm-project#146534

@rui314
Copy link
Collaborator

rui314 commented Jul 1, 2025

I think we need to clarify which relocations write data in big-endian order when the output is big-endian. My understanding is as follows:

R_RISCV_{32,64}
R_RISCV_ADD{16,32,64}
R_RISCV_SUB{16,32,64}
R_RISCV_SET{16,32,64}
R_RISCV_32_PCREL
R_RISCV_PLT32

@djtodoro
Copy link
Author

djtodoro commented Jul 4, 2025

I think we need to clarify which relocations write data in big-endian order when the output is big-endian. My understanding is as follows:

R_RISCV_{32,64} R_RISCV_ADD{16,32,64} R_RISCV_SUB{16,32,64} R_RISCV_SET{16,32,64} R_RISCV_32_PCREL R_RISCV_PLT32

Hi @rui314, I agree, thanks a lot for pointing that 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