Conversation
|
|
||
| NOTE: This style of function descriptor is used in specialized FDPIC ABIs for | ||
| Blackfin, FR-V, SuperH, and Arm, and is part of the default ABI for PA-RISC, | ||
| POWER (v1 only, has a third "static chain" field), and IA-64. |
There was a problem hiding this comment.
In PPC64 ELFv1, "static chain" is for dynamic linker's lazy binding. This is "environment pointer"?
There was a problem hiding this comment.
I think the two terms are interchangeable; they both go into r11 anyway. x86-64 also calls the register static chain.
| In ePIC, `gp` is invariant and holds the GOT address for the process image at | ||
| all instruction boundries. | ||
|
|
||
| == Range extension thunks |
There was a problem hiding this comment.
This seems to belong to another proposal?
There was a problem hiding this comment.
There's another proposal to add it to the non-FDPIC ABI but it's considered an integral part of the FDPIC ABI.
|
|
||
| === riscv-toolchain-conventions | ||
|
|
||
| Add -mfdpic option for FDPIC and -mepic option for ePIC. |
There was a problem hiding this comment.
I think -mepic in the previous proposal is in spirit identical to -msep-data (m68k, bfin) and -mno-pic-data-is-text-relative (arm).
-fPIE -mfdpic with hidden visibility declarations can replace -fPIE -msep-data, though setting the call-clobbered FDPIC register has slight overhead.
Do we want to introduce another option to avoid the minor FDPIC register overhead?
There was a problem hiding this comment.
You're saving two memory accesses on a generic function call. It's probably close to -fomit-frame-pointer in total.
|
Ping, @sorear do you have further update on this, or do you need some help on PoC implementation? |
|
Hi @sorear and @kito-cheng , I am wondering how's the current status of this psABI ? |
Yeah, this PR is kinda lack of resource to moving forward, I am happy to push this forward, however this is not on my priority list yet, and seems @sorear are busy with other stuffs, so...volunteer is welcome :P |
This needs extensive editing to match the existing document, and I also haven't even started on prototype coding, but it's become clear the specification needs to exist somewhere other than my answers to questions on IRC so let's start a draft here.
I intend to create a second PR when I have something ready for formal review. Feel free to use this as a discussion thread for the high-level design.