On 07/27/2018 03:44 PM, Eric Botcazou wrote:
Apropos of the discussion about improving the docs for
TARGET_CUSTOM_FUNCTION_DESCRIPTORS in the context of the C-SKY port
submission,
https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01454.html
here is the patch I've come up with based on reading the source. Is
this technically accurate? Any suggestions on how to improve it further?
""Define this hook to 0 if the target implements custom support"
"custom" was precisely chosen to distinguish this kind of descriptors from the
standard descriptors used on IA-64 or HP-PA, so it's contradictory. Moreover
I would really start with the "custom" case and not the standard case as was
originally written, the "custom" case being the common case for targets.
This is precisely what I found so confusing about the original text. To
me, "custom" implies that the back end is *customized* to have its own
descriptor implementation to conform to target-specific ABI standards,
not that it uses a generic implementation in common code.
I'm not really convinced by the substitution misalignment -> tag either, but
if others find the new version more understandable, then OK with me.
I could make the docs say both things, but from the perspective of a
back end implementor, being explicit that it's a bit mask used to
differentiate descriptors from any valid function pointer (so you can
figure out what an appropriate value to define it to is) is more
critical than describing what target-independent code does with a
descriptor once it has identified that's what it's got.
-Sandra