diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-09-30 16:19:43 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-09-30 16:19:43 +0000 |
commit | 002ffd3caa684c3eb30f8f53206439b7aa34b370 (patch) | |
tree | bc1fb384d8c3f5469131ebbe8416b7880c2fc784 /gcc/target.def | |
parent | bd785b44932274f7067105de417938597289962c (diff) | |
download | gcc-002ffd3caa684c3eb30f8f53206439b7aa34b370.zip gcc-002ffd3caa684c3eb30f8f53206439b7aa34b370.tar.gz gcc-002ffd3caa684c3eb30f8f53206439b7aa34b370.tar.bz2 |
Add a target hook for getting an ABI from a function type
This patch adds a target hook that allows targets to return
the ABI associated with a particular function type. Generally,
when multiple ABIs are in use, it must be possible to tell from
a function type and its attributes which ABI it is using.
2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* target.def (fntype_abi): New target hook.
* doc/tm.texi.in (TARGET_FNTYPE_ABI): Likewise.
* doc/tm.texi: Regenerate.
* target.h (predefined_function_abi): Declare.
* function-abi.cc (fntype_abi): Call targetm.calls.fntype_abi,
if defined.
* config/aarch64/aarch64.h (ARM_PCS_SIMD): New arm_pcs value.
* config/aarch64/aarch64.c: Include function-abi.h.
(aarch64_simd_abi, aarch64_fntype_abi): New functions.
(TARGET_FNTYPE_ABI): Define.
From-SVN: r276308
Diffstat (limited to 'gcc/target.def')
-rw-r--r-- | gcc/target.def | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/target.def b/gcc/target.def index f9446fa..803c7a3 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -4943,6 +4943,15 @@ If this hook is not defined, then FUNCTION_VALUE_REGNO_P will be used.", bool, (const unsigned int regno), default_function_value_regno_p) +DEFHOOK +(fntype_abi, + "Return the ABI used by a function with type @var{type}; see the\n\ +definition of @code{predefined_function_abi} for details of the ABI\n\ +descriptor. Targets only need to define this hook if they support\n\ +interoperability between several ABIs in the same translation unit.", + const predefined_function_abi &, (const_tree type), + NULL) + /* ??? Documenting this hook requires a GFDL license grant. */ DEFHOOK_UNDOC (internal_arg_pointer, |