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

[EABI] RV32 only stack support instructions #176

Open
jnk0le opened this issue Jul 24, 2022 · 2 comments
Open

[EABI] RV32 only stack support instructions #176

jnk0le opened this issue Jul 24, 2022 · 2 comments
Labels
future idea Something for a future version of the spec

Comments

@jnk0le
Copy link
Contributor

jnk0le commented Jul 24, 2022

Due to 2xXLEN stack alignment, RV32 eabi needs extra compressed instructions to efficiently operate on 8 byte aligned stack, otherwise non compressed instructions will have to be used when limiting stack waste is important.

  • push/pop with 8 byte stack granularity (probably 3rd imm bit?)- most obvious alternative is to not use push/pop, or use it for 3-4 reg chunks only and handle rest by addi + loads/stores

  • C(M).ADDI8SP - probably not necessary, push/pop with 8 byte granularity can prepare initial 8 byte allocation for an following addi16sp. Non zcmpe EABI cores may need it.

@tariqkurd-repo
Copy link
Contributor

why 8-byte aligned? Is this in the EABI proposal?

@jnk0le
Copy link
Contributor Author

jnk0le commented Jul 27, 2022

@tariqkurd-repo tariqkurd-repo added the future idea Something for a future version of the spec label Sep 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
future idea Something for a future version of the spec
Projects
None yet
Development

No branches or pull requests

2 participants