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

Add toolchain conventions for loongarch32 #1

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

Conversation

jiegec
Copy link

@jiegec jiegec commented Dec 26, 2024

No description provided.

@jiegec
Copy link
Author

jiegec commented Dec 26, 2024

I suggest making la32r as a ISA subset of la32, or la32 begin a ISA superset of la32r. They are distinguished by -march=loongarch32 and -march=loongarch32r. What's your opinion?

@chenhuacai
Copy link

I suggest making la32r as a ISA subset of la32, or la32 begin a ISA superset of la32r. They are distinguished by -march=loongarch32 and -march=loongarch32r. What's your opinion?

I agree, you can start coding now. Code can help us to confirm the correctness and get this PR merged finally.

@xen0n
Copy link

xen0n commented Jan 1, 2025

Yeah I would agree to not distinguishing LA32S and LA32R via ELF e_flags or something similar, at least not right now. Starting from simple -march configuration would be most simple.

Eventually we may want to mark object files the RISC-V way, via a dedicated ELF attribute section, to avoid accidental ISA/ABI mismatches. But a naive approach e.g. just recording the ISA features used and disallowing interlink if linking for a lower baseline, would not allow for easy implementation of best-practices such as "dynamic ISA probing via HWCAP/CPUCFG + dispatch to optimized code" -- without post-processing of object files, the resulting program would appear as if it required the extra ISA features to run. Hence, a proper scheme that allows for both:

  • accurate description of baseline requirements, and
  • easy implementation of dynamically-dispatched optimization,

would take more time to get designed and PoC made, and I'd prefer prioritizing the current LA32(R) work over that.

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.

3 participants