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

Fix: c.addi4spn with imm=0 and rd'!=0 should be reserved #3694

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

Conversation

ngc7331
Copy link

@ngc7331 ngc7331 commented Oct 31, 2024

Related issue: not applicable

Type of change: bug report

Impact: API modification

Development Phase: implementation

Release Notes

According to unprivileged specification section 26.5.2:

C.ADDI4SPN is a CIW-format instruction that adds a zero-extended non-zero immediate, scaled by
4, to the stack pointer, x2, and writes the result to rd′. This instruction is used to generate pointers to
stack-allocated variables, and expands to addi rd′, x2, nzuimm[9:2]. C.ADDI4SPN is only valid
when nzuimm≠0; the code points with nzuimm=0 are reserved.

C.ADDI4SPN with imm=0 (i.e. x(12,5) === 0.U) should be reserved (illegal for now), whether or not rd'=0 (i.e. x(4,2) === 0.U)

Copy link

linux-foundation-easycla bot commented Oct 31, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

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.

1 participant