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

proposal: change GORISCV64=rva20u64 to include compressed instructions #71105

Open
4a6f656c opened this issue Jan 3, 2025 · 9 comments
Open
Labels
Milestone

Comments

@4a6f656c
Copy link
Contributor

4a6f656c commented Jan 3, 2025

Proposal Details

When the proposal for GORISCV64 was being discussed, the situation regarding compressed instructions for RISC-V was somewhat unclear and there were discussions about potentially reusing the encoding space. As such, the decision was to make the default GORISCV64 value be rva20u64 but explicitly exclude compressed instructions, effectively giving rv64g:

#61476 (comment)

There has since been a decision regarding the future of the C extension, with it remaining a mandatory part of RVA20 and RVA22:

https://lists.riscv.org/g/tech-profiles/topic/rvi_bod_decision_regarding/102522954

This means that all general purpose RISC-V hardware that Go will run on must support compressed instructions.

This proposal is to change Go's meaning of GORISCV64=rva20u64 to include compressed instructions, instead of continuing to prohibit them.

@4a6f656c
Copy link
Contributor Author

4a6f656c commented Jan 3, 2025

/cc @markdryan

@gabyhelp
Copy link

gabyhelp commented Jan 3, 2025

Related Issues

Related Code Changes

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/523477 mentions this issue: cmd/internal/obj/riscv: add support for compressed instructions

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/523478 mentions this issue: cmd/compile/internal/riscv64: use CNOP for compiler inserted NOPs

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/523476 mentions this issue: cmd/internal/obj/riscv: add encoding for compressed riscv64 instructions

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/639656 mentions this issue: cmd/obj/riscv: add support for the Compressed extension

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/639657 mentions this issue: cmd/obj/riscv: compress ADD instructions

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/639658 mentions this issue: cmd/obj/riscv: compress NOP instructions

@ianlancetaylor ianlancetaylor changed the title all: change GORISCV64=rva20u64 to include compressed instructions proposal: change GORISCV64=rva20u64 to include compressed instructions Jan 3, 2025
@gopherbot gopherbot added this to the Proposal milestone Jan 3, 2025
@ianlancetaylor ianlancetaylor moved this to Incoming in Proposals Jan 3, 2025
@ianlancetaylor
Copy link
Member

CC @golang/riscv64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Incoming
Development

No branches or pull requests

4 participants