riscvarchive / riscv-code-size-reduction

https://jira.riscv.org/browse/RVG-122
150 stars 34 forks source link

Document psABI changes for Zcmt #191

Closed abukharmeh closed 1 year ago

abukharmeh commented 2 years ago

For the spec ratification, we need to document the following 3 items in psABI spec

  1. Document the section name for the table. (e.g. .riscv.tbljalvec)
  2. Document the symbol name of the section (e.g. __tbljalvec_base$)
  3. Document how the linker optimizes (or relaxes) the program by zcmt.

Item 2 and 3 could be documented in a similar fashion to the Global-pointer Relaxation while item 1 needs to be documented in special-section chapter of the document

Thank you @kito-cheng for very helpful pointers

abukharmeh commented 2 years ago

@linsinan1995 @Xinlong-Wu Could you please have a go at documenting what is there or what we think is needed and create a PR to the psABI repo If someone else think they are able to do this documentation work, it would be really helpful

abukharmeh commented 2 years ago

This presentation gives details about the relaxation process in GCC, though I am not sure that's the ideal way to do it ! https://docs.google.com/presentation/d/1ilfCIc9Bv4Ryl2Uyl3uwYtANlh9GSIroQC8Z-VIfUPk/edit#slide=id.g10c480b750a_0_274

linsinan1995 commented 2 years ago

I can help document the detail, but I would suggest we first decide and document the section and symbol name in ZC spec.

I am personally fine with your examples (.riscv.tbljalvec and __tbljalvec_base).

Xinlong-Wu commented 2 years ago

sure, I'm glad I could be of help

abukharmeh commented 2 years ago

Initial PR was created by @linsinan1995 thank you very much @Xinlong-Wu Please review it and check if there is anything that need to be added !

tariqkurd-repo commented 2 years ago

is this confirmed? Should I add

Document the section name for the table. (e.g. .riscv.tbljalvec) Document the symbol name of the section (e.g. __tbljalvec_base$)

to the spec?

abukharmeh commented 1 year ago

I think we can close this one now, do we need to document section name and symbol name in Zc* document, or psABI documentation would suffice ?