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 #ifndef RETURN_IN_MEMORY
111 return (TYPE_MODE (type
) == BLKmode
);
113 return RETURN_IN_MEMORY (type
);
118 default_expand_builtin_saveregs (void)
120 #ifdef EXPAND_BUILTIN_SAVEREGS
121 return EXPAND_BUILTIN_SAVEREGS ();
123 error ("__builtin_saveregs not supported by this target");
129 default_setup_incoming_varargs (CUMULATIVE_ARGS
*ca ATTRIBUTE_UNUSED
,
130 enum machine_mode mode ATTRIBUTE_UNUSED
,
131 tree type ATTRIBUTE_UNUSED
,
132 int *pretend_arg_size ATTRIBUTE_UNUSED
,
133 int second_time ATTRIBUTE_UNUSED
)
135 #ifdef SETUP_INCOMING_VARARGS
136 SETUP_INCOMING_VARARGS ((*ca
), mode
, type
, (*pretend_arg_size
), second_time
);
141 default_strict_argument_naming (CUMULATIVE_ARGS
*ca ATTRIBUTE_UNUSED
)
143 #ifdef STRICT_ARGUMENT_NAMING
144 return STRICT_ARGUMENT_NAMING
;
151 default_pretend_outgoing_varargs_named(CUMULATIVE_ARGS
*ca ATTRIBUTE_UNUSED
)
153 #ifdef PRETEND_OUTGOING_VARARGS_NAMED
154 return PRETEND_OUTGOING_VARARGS_NAMED
;
156 #ifdef SETUP_INCOMING_VARARGS
159 return (targetm
.calls
.setup_incoming_varargs
!= default_setup_incoming_varargs
);