This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ARM] hard VFP calling convention support [0/3]


I'm finally in a position where I can release GCC support for the hard
VFP calling variant of the AAPCS.  I've divided the patch into three
components since a couple of them require approval from other
maintainers.

This patch is sufficiently complex that I think it is probably too late
to include it in the 4.4 release, however, I want to create a branch for
it that will track 4.4 and then merge it to mainline once we have forked
for the release.

Top-level ChangeLog

<date>  Richard Earnshaw <rearnsha@arm.com>

	ARM Hard-VFP calling convention
	* target-def.h (TARGET_LIBCALL_VALUE): New hook.
	* target.h (gcc_target): Add libcall_value to table of call hooks.
	* targhooks.h (default_libcall_value): Default implementation.
	* targhooks.c (default_libcall_value): Likewise.
	* doc/tm.texi (TARGET_LIBCALL_VALUE): Document it.
	* optabs.c (expand_unop): Use it.
	* expr.h (hard_libcall_value): Pass the function RTX through.
	* calls.c (emit_library_call_value_1): Update call to 
	hard_libcall_value.
	* explow.c (hard_libcall_value): Use new target hook.
	* testsuite/lib/target-supports.exp
	(check_effective_target_arm_hard_vfp_ok): New hook.
	(check_effective_target_arm_neon_ok): Improve test for neon
	availability.
	* testsuite/gcc.target/arm/eabi1.c: Only run test in base variant.
	* config/arm/arm.c: Include cgraph.h
	(TARGET_FUNCTION_VALUE): Override default hook.
	(arm_pcs_default): New variable.
	(arm_override_options): Don't fault hard calling convention with VFP.
	Add support for AAPCS variants.
	(arm_function_value): Make static.  Handle AAPCS variants.
	(arm_libcall_value): New function.
	(arm_apply_result_size): Handle VFP registers in results.
	(arm_return_in_memory): Rework all AAPCS variants; handle hard-vfp
	conventions.
	(pcs_attribute_args): New variable.
	(arm_pcs_from_attribute): New function.
	(arm_get_pcs_model): New function.
	(aapcs_vfp_cum_init): New function.
	(aapcs_vfp_sub_candidate): New function.
	(aapcs_vfp_is_return_candidate): New function.
	(aapcs_vfp_is_call_candidate): New function.
	(aapcs_vfp_allocate): New function.
	(aapcs_vfp_allocate_return_reg): New function.
	(aapcs_vfp_advance): New function.
	(aapcs_cp_arg_layout): New variable.
	(aapcs_select_call_coproc): New function.
	(aapcs_select_return_coproc): New function.
	(aapcs_allocate_return_reg): New function.
	(aapcs_libcall_value): New function.
	(aapcs_layout_arg): New function.
	(arm_init_cumulative_args): Initialize AAPCS args data.
	(arm_function_arg): Handle AAPCS variants using new interface.
	(arm_arg_parital_bytes): Likewise.
	(arm_function_arg_advance): New function.
	(arm_function_ok_for_sibcall): Ensure that sibling calls agree on
	calling conventions.
	(arm_setup_incoming_varargs): Handle new AAPCS args data.
	* arm.h (NUM_VFP_ARG_REGS): Define.
	(LIBCALL_VALUE): Update.
	(FUNCTION_VALUE): Delete.
	(FUNCTION_VALUE_REGNO_P): Add VFP regs.
	(arm_pcs): New enum.
	(CUMULATIVE_ARGS): New data to support AAPCS argument marshalling.
	(FUNCTION_ARG_ADVANCE): Call arm_function_arg_advance.
	(FUNCTION_ARG_REGNO_P): Add VFP regs.
	* arm-protos.h (arm_function_arg_advance): Add.
	(aapcs_libcall_value): Add.
	(arm_function_value): Delete.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]