1 /* Default target hook functions.
2 Copyright (C) 2003 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING. If not, write to the Free
18 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #include "coretypes.h"
33 #include "target-def.h"
36 default_promote_function_args (fntype)
37 tree fntype ATTRIBUTE_UNUSED;
39 #ifdef PROMOTE_FUNCTION_ARGS
47 default_promote_function_return (fntype)
48 tree fntype ATTRIBUTE_UNUSED;
50 #ifdef PROMOTE_FUNCTION_RETURN
58 default_promote_prototypes (fntype)
59 tree fntype ATTRIBUTE_UNUSED;
61 if (PROMOTE_PROTOTYPES)
68 default_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED, int incoming)
73 #ifdef STRUCT_VALUE_INCOMING
74 rv = STRUCT_VALUE_INCOMING;
76 #ifdef STRUCT_VALUE_INCOMING_REGNUM
77 rv = gen_rtx_REG (Pmode, STRUCT_VALUE_INCOMING_REGNUM);
82 #ifndef STRUCT_VALUE_REGNUM
85 rv = gen_rtx_REG (Pmode, STRUCT_VALUE_REGNUM);
96 #ifndef STRUCT_VALUE_REGNUM
99 rv = gen_rtx_REG (Pmode, STRUCT_VALUE_REGNUM);
107 default_return_in_memory (tree type,
108 tree fntype ATTRIBUTE_UNUSED)
110 return (TYPE_MODE (type) == BLKmode);
114 default_expand_builtin_saveregs (void)
116 #ifdef EXPAND_BUILTIN_SAVEREGS
117 return EXPAND_BUILTIN_SAVEREGS ();
119 error ("__builtin_saveregs not supported by this target");
125 default_setup_incoming_varargs (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
126 enum machine_mode mode ATTRIBUTE_UNUSED,
127 tree type ATTRIBUTE_UNUSED,
128 int *pretend_arg_size ATTRIBUTE_UNUSED,
129 int second_time ATTRIBUTE_UNUSED)
131 #ifdef SETUP_INCOMING_VARARGS
132 SETUP_INCOMING_VARARGS ((*ca), mode, type, (*pretend_arg_size), second_time);
137 default_strict_argument_naming (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
139 #ifdef STRICT_ARGUMENT_NAMING
140 return STRICT_ARGUMENT_NAMING;
147 default_pretend_outgoing_varargs_named(CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
149 #ifdef PRETEND_OUTGOING_VARARGS_NAMED
150 return PRETEND_OUTGOING_VARARGS_NAMED;
152 #ifdef SETUP_INCOMING_VARARGS
155 return (targetm.calls.setup_incoming_varargs != default_setup_incoming_varargs);