aboutsummaryrefslogtreecommitdiff
path: root/gcc/target.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-03-12 02:03:32 -0800
committerRichard Henderson <rth@gcc.gnu.org>2004-03-12 02:03:32 -0800
commit42ba51300418d586a41637d9c1fc72c6078b7c6d (patch)
treebdd3000f3e6489ec11b58de31921ac902908031e /gcc/target.h
parentac011d28bb63763829fd3bec7792fe13d58cfac7 (diff)
downloadgcc-42ba51300418d586a41637d9c1fc72c6078b7c6d.zip
gcc-42ba51300418d586a41637d9c1fc72c6078b7c6d.tar.gz
gcc-42ba51300418d586a41637d9c1fc72c6078b7c6d.tar.bz2
re PR target/14547 (Passing _Complex long double does not follow the ABI)
PR target/14547 * target.h (struct gcc_target): Move calls substructure before booleans. Add split_complex_arg. * function.c (assign_parms, split_complex_args): Use it. * calls.c (expand_call): Likewise. (split_complex_values): Likewise. Check for splittable types before allocating memory. (split_complex_types): Likewise. * system.h (SPLIT_COMPLEX_ARGS): Poison. * expr.h (SPLIT_COMPLEX_ARGS): Remove. * target-def.h (TARGET_SPLIT_COMPLEX_ARG): New. * config/alpha/alpha.c (alpha_split_complex_arg): New. (TARGET_SPLIT_COMPLEX_ARG): New. * config/alpha/alpha.h (SPLIT_COMPLEX_ARGS): Remove. * config/rs6000/rs6000.c (TARGET_SPLIT_COMPLEX_ARG): New. (rs6000_override_options): Zap it for non-AIX. (rs6000_function_value): Use targetm.calls.split_complex_arg. * config/rs6000/rs6000.h (SPLIT_COMPLEX_ARGS): Remove. * config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): New. * config/xtensa/xtensa.h (SPLIT_COMPLEX_ARGS): Remove. * doc/tm.texi (TARGET_SPLIT_COMPLEX_ARG): Modify from old SPLIT_COMPLEX_ARGS entry. From-SVN: r79376
Diffstat (limited to 'gcc/target.h')
-rw-r--r--gcc/target.h43
1 files changed, 25 insertions, 18 deletions
diff --git a/gcc/target.h b/gcc/target.h
index 2387e4d..e33e815 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -429,6 +429,30 @@ struct gcc_target
the port wishes to automatically clobber for all asms. */
tree (* md_asm_clobbers) (tree);
+ /* Functions relating to calls - argument passing, returns, etc. */
+ struct calls {
+ bool (*promote_function_args) (tree fntype);
+ bool (*promote_function_return) (tree fntype);
+ bool (*promote_prototypes) (tree fntype);
+ rtx (*struct_value_rtx) (tree fndecl, int incoming);
+ bool (*return_in_memory) (tree type, tree fndecl);
+ bool (*return_in_msb) (tree type);
+ rtx (*expand_builtin_saveregs) (void);
+ /* Returns pretend_argument_size. */
+ void (*setup_incoming_varargs) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
+ tree type, int *pretend_arg_size,
+ int second_time);
+ bool (*strict_argument_naming) (CUMULATIVE_ARGS *ca);
+ /* Returns true if we should use
+ targetm.calls.setup_incoming_varargs() and/or
+ targetm.calls.strict_argument_naming(). */
+ bool (*pretend_outgoing_varargs_named) (CUMULATIVE_ARGS *ca);
+
+ /* Given a complex type T, return true if a parameter of type T
+ should be passed as two scalars. */
+ bool (* split_complex_arg) (tree type);
+ } calls;
+
/* Leave the boolean fields at the end. */
/* True if arbitrary sections are supported. */
@@ -455,24 +479,7 @@ struct gcc_target
at the beginning of assembly output. */
bool file_start_file_directive;
- /* Functions relating to calls - argument passing, returns, etc. */
- struct calls {
- bool (*promote_function_args) (tree fntype);
- bool (*promote_function_return) (tree fntype);
- bool (*promote_prototypes) (tree fntype);
- rtx (*struct_value_rtx) (tree fndecl, int incoming);
- bool (*return_in_memory) (tree type, tree fndecl);
- bool (*return_in_msb) (tree type);
- rtx (*expand_builtin_saveregs) (void);
- /* Returns pretend_argument_size. */
- void (*setup_incoming_varargs) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
- tree type, int *pretend_arg_size, int second_time);
- bool (*strict_argument_naming) (CUMULATIVE_ARGS *ca);
- /* Returns true if we should use
- targetm.calls.setup_incoming_varargs() and/or
- targetm.calls.strict_argument_naming(). */
- bool (*pretend_outgoing_varargs_named) (CUMULATIVE_ARGS *ca);
- } calls;
+ /* Leave the boolean fields at the end. */
};
extern struct gcc_target targetm;