[PATCH] calls.c precompute_register_parameters for TLS

Eric Botcazou ebotcazou@adacore.com
Sat Mar 28 09:18:32 GMT 2020


> I'm forced to fall back to a targeted patch in
> calls.c:precompute_register_parameters() that tests exactly for TLS
> symbols on AIX instead of using the legitimate_constant_p hook to test
> for TLS symbols.
> 
> I could create a new target hook for this specific use in calls.c and
> define it as an alias to legitimate_constant_p for all other targets,
> but that solution seems overkill for a very narrow and target-specific
> issue.  No other target will override this hook.

That would not be the first example I think.  Defining a new target hook 
doesn't mean touching the other back-ends: you put a default in target.def 
which lives in targhooks.c and just calls targetm.legitimate_constant_p,
so you only need to patch target.def, targhooks.c and targhooks.h.

-- 
Eric Botcazou


More information about the Gcc-patches mailing list