Skip to content

Conversation

@lenary
Copy link
Contributor

@lenary lenary commented Apr 9, 2025

The existing documentation didn't mention that ld and sd symbol pseudos aren't available on RV32. This change clarifies that these are available, but denote pair load/stores using the Zilsd instructions.

The existing documentation didn't mention that `ld` and `sd` symbol
pseudos aren't available on RV32. This change clarifies that these are
available, but denote pair load/stores using the Zilsd instructions.
@lenary
Copy link
Contributor Author

lenary commented Apr 9, 2025

Copy link
Contributor

@topperc topperc left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@kito-cheng kito-cheng left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@cmuellner cmuellner left a comment

Choose a reason for hiding this comment

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

LGTM

1c: R_RISCV_PCREL_LO12_S .L0
----

On RV32, `ld <rd>, <symbol>` and `sd <rd>, <symbol>, <rt>` can be used to
Copy link

@MaskRay MaskRay Apr 9, 2025

Choose a reason for hiding this comment

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

Is <symbol>+<offset> allowed?

(Allowed in gas and llvm but the llvm AsmParser is a bit of a hack.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

LLVM looks like it is passing the offset through to the relocation correctly, so I'm happy to allow this. I can clarify the wording to ensure it is, because there are other places that allow <symbol>{+<offset>} when they only say <symbol> right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated this to be <symbol expression> which can be symbol, offset, or symbol with offset.

Copy link
Collaborator

@cmuellner cmuellner left a comment

Choose a reason for hiding this comment

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

We discussed this briefly in today's SIG Toolchain meeting and agreed there to land this.

@cmuellner cmuellner merged commit 60f9743 into riscv-non-isa:main May 8, 2025
2 checks passed
@lenary lenary deleted the pr/zilsd-pseudos branch June 9, 2025 20:56
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.

5 participants