[PATCH] ARM half-precision floating point, 3/8 (target hooks)

Sandra Loosemore sandra@codesourcery.com
Wed Apr 15 22:21:00 GMT 2009


This patch adds the target hooks that are required to get the C and
C++ language-level support for HFmode, specifically including the
implicit promotion and restrictions on function argument/return types.
The included documentation patch should be sufficient to explain the
details.

-Sandra


2009-04-15  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* doc/tm.texi (Misc): Document TARGET_INVALID_PARAMETER_TYPE,
	TARGET_INVALID_RETURN_TYPE, TARGET_PROMOTED_TYPE, and
	TARGET_CONVERT_TO_TYPE.
	* hooks.c (hook_tree_const_tree_null): Define.
	* hooks.h (hook_tree_const_tree_null): Declare.
	* target.h (struct gcc_target):  Add invalid_parameter_type,
	invalid_return_type, promoted_type, and convert_to_type fields.
	* target-def.h: (TARGET_INVALID_PARAMETER_TYPE): Define.
	(TARGET_INVALID_RETURN_TYPE): Define.
	(TARGET_PROMOTED_TYPE): Define.
	(TARGET_CONVERT_TO_TYPE): Define.
	(TARGET_INITIALIZER): Update for new fields.
	* c-decl.c (grokdeclarator): Check targetm.invalid_return_type.
	(grokparms): Check targetm.invalid_parameter_type.
	* c-typeck.c (default_conversion): Check targetm.promoted_type.
	* c-convert.c (convert): Check targetm.convert_to_type.
	* cp/typeck.c (default_conversion): Check targetm.promoted_type.
	* cp/decl.c (grokdeclarator): Check targetm.invalid_return_type.
	(grokparms): Check targetm.invalid_parameter_type.
	* cp/cvt.c (ocp_convert): Check targetm.convert_to_type.
	(build_expr_type_conversion): Check targetm.promoted_type.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fp16-3.patch
Type: text/x-patch
Size: 11291 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090415/401dec44/attachment.bin>


More information about the Gcc-patches mailing list