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

Richard Earnshaw rearnsha@arm.com
Mon Dec 8 17:14:00 GMT 2008


This is the bulk of the patch (all arm-specific).

	* 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.
	* config/arm/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.
	* config/arm/arm-protos.h (arm_function_arg_advance): Add.
	(aapcs_libcall_value): Add.
	(arm_function_value): Delete.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hard-vfp-3.patch
Type: text/x-patch
Size: 42124 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20081208/a089adb7/attachment.bin>


More information about the Gcc-patches mailing list