Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Add -mabi=ilp32e #110

Merged
merged 1 commit into from
Nov 29, 2017
Merged

Add -mabi=ilp32e #110

merged 1 commit into from
Nov 29, 2017

Conversation

kito-cheng
Copy link
Collaborator

@palmer-dabbelt
Copy link
Contributor

Thanks, Kito. I probably won't have time to look at this for a bit, but I appreciate the help :)

Copy link
Collaborator

@jim-wilson jim-wilson left a comment

Choose a reason for hiding this comment

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

ABI_SPEC in riscv.h also needs to be updated, to get the library paths right for ilp32e.

There is also a MUSL_ABI_SUFFIX in linux.h, but I think rv32e and linux are contradictory, though maybe we should emit an error somewhere if someone tries to use rv32e with linux. This part is optional.

gcc/config.gcc Outdated
@@ -4056,11 +4057,12 @@ case "${target}" in
# pick a default based on the ISA, preferring soft-float
# unless the D extension is present.
case "${with_abi}" in
ilp32 | ilp32f | ilp32d | lp64 | lp64f | lp64d)
ilp32 | ilp32f | ilp32d | lp64 | lp64f | lp64d | lp64q)
Copy link
Collaborator

Choose a reason for hiding this comment

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

ilp32e needs to be in this list of valid abis, otherwise you are overriding the user's choice, and won't give an error if the user makes a mistake with non-matching arch/abi.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed, that's my mistake when rebase with Q-extension...

if (riscv_abi == ABI_ILP32E)
{
for (int r = 16; r <= 31; r++)
call_used_regs[r] = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

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

An extra space before the =, minor nit.

Copy link
Collaborator Author

@kito-cheng kito-cheng Nov 23, 2017

Choose a reason for hiding this comment

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

Fixed :)

@kito-cheng
Copy link
Collaborator Author

@palmer-dabbelt
We have Jim now!

@jim-wilson
ABI_SPEC also fixed. And linux kernel doesn't support rv32e so just keep MUSL_ABI_SUFFIX unchanged.

thanks for your review :)

@jim-wilson
Copy link
Collaborator

I am unfamiliar with github workflow in general, and riscv github workflow in particular. I was assuming that the person who submitted the patch would merge them after approval. This is how FSF binutils/gcc work. If you are waiting for me to merge them, let me know.

@kito-cheng kito-cheng merged commit d4f08c1 into riscv-next Nov 29, 2017
@kito-cheng kito-cheng deleted the mabi-rv32e branch February 12, 2020 11:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants