00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 #include "config.h"
00051 #include "system.h"
00052 #include "coretypes.h"
00053 #include "tm.h"
00054 #include "machmode.h"
00055 #include "rtl.h"
00056 #include "tree.h"
00057 #include "expr.h"
00058 #include "output.h"
00059 #include "toplev.h"
00060 #include "function.h"
00061 #include "target.h"
00062 #include "tm_p.h"
00063 #include "target-def.h"
00064
00065
00066 void
00067 default_external_libcall (rtx fun ATTRIBUTE_UNUSED)
00068 {
00069 #ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
00070 ASM_OUTPUT_EXTERNAL_LIBCALL(asm_out_file, fun);
00071 #endif
00072 }
00073
00074 enum machine_mode
00075 default_cc_modes_compatible (enum machine_mode m1, enum machine_mode m2)
00076 {
00077 if (m1 == m2)
00078 return m1;
00079 return VOIDmode;
00080 }
00081
00082 bool
00083 default_return_in_memory (tree type,
00084 tree fntype ATTRIBUTE_UNUSED)
00085 {
00086 #ifndef RETURN_IN_MEMORY
00087 return (TYPE_MODE (type) == BLKmode);
00088 #else
00089 return RETURN_IN_MEMORY (type);
00090 #endif
00091 }
00092
00093 rtx
00094 default_expand_builtin_saveregs (void)
00095 {
00096 error ("__builtin_saveregs not supported by this target");
00097 return const0_rtx;
00098 }
00099
00100 void
00101 default_setup_incoming_varargs (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
00102 enum machine_mode mode ATTRIBUTE_UNUSED,
00103 tree type ATTRIBUTE_UNUSED,
00104 int *pretend_arg_size ATTRIBUTE_UNUSED,
00105 int second_time ATTRIBUTE_UNUSED)
00106 {
00107 }
00108
00109
00110
00111 rtx
00112 default_builtin_setjmp_frame_value (void)
00113 {
00114 return virtual_stack_vars_rtx;
00115 }
00116
00117
00118
00119 bool
00120 hook_bool_CUMULATIVE_ARGS_false (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
00121 {
00122 return false;
00123 }
00124
00125 bool
00126 default_pretend_outgoing_varargs_named (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
00127 {
00128 return (targetm.calls.setup_incoming_varargs
00129 != default_setup_incoming_varargs);
00130 }
00131
00132 enum machine_mode
00133 default_eh_return_filter_mode (void)
00134 {
00135 return word_mode;
00136 }
00137
00138
00139
00140 unsigned HOST_WIDE_INT
00141 default_shift_truncation_mask (enum machine_mode mode)
00142 {
00143 return SHIFT_COUNT_TRUNCATED ? GET_MODE_BITSIZE (mode) - 1 : 0;
00144 }
00145
00146
00147
00148 bool
00149 hook_bool_CUMULATIVE_ARGS_true (CUMULATIVE_ARGS * a ATTRIBUTE_UNUSED)
00150 {
00151 return true;
00152 }
00153
00154
00155
00156 tree
00157 default_cxx_guard_type (void)
00158 {
00159 return long_long_integer_type_node;
00160 }
00161
00162
00163
00164
00165
00166
00167 tree
00168 default_cxx_get_cookie_size (tree type)
00169 {
00170 tree cookie_size;
00171
00172
00173
00174 tree sizetype_size;
00175 tree type_align;
00176
00177 sizetype_size = size_in_bytes (sizetype);
00178 type_align = size_int (TYPE_ALIGN_UNIT (type));
00179 if (INT_CST_LT_UNSIGNED (type_align, sizetype_size))
00180 cookie_size = sizetype_size;
00181 else
00182 cookie_size = type_align;
00183
00184 return cookie_size;
00185 }
00186
00187
00188
00189
00190 bool
00191 hook_pass_by_reference_must_pass_in_stack (CUMULATIVE_ARGS *c ATTRIBUTE_UNUSED,
00192 enum machine_mode mode ATTRIBUTE_UNUSED, tree type ATTRIBUTE_UNUSED,
00193 bool named_arg ATTRIBUTE_UNUSED)
00194 {
00195 return targetm.calls.must_pass_in_stack (mode, type);
00196 }
00197
00198
00199
00200
00201 bool
00202 hook_callee_copies_named (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
00203 enum machine_mode mode ATTRIBUTE_UNUSED,
00204 tree type ATTRIBUTE_UNUSED, bool named)
00205 {
00206 return named;
00207 }
00208
00209
00210
00211 void
00212 default_unwind_emit (FILE * stream ATTRIBUTE_UNUSED,
00213 rtx insn ATTRIBUTE_UNUSED)
00214 {
00215
00216 gcc_unreachable ();
00217 }
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228 bool
00229 default_scalar_mode_supported_p (enum machine_mode mode)
00230 {
00231 int precision = GET_MODE_PRECISION (mode);
00232
00233 switch (GET_MODE_CLASS (mode))
00234 {
00235 case MODE_PARTIAL_INT:
00236 case MODE_INT:
00237 if (precision == CHAR_TYPE_SIZE)
00238 return true;
00239 if (precision == SHORT_TYPE_SIZE)
00240 return true;
00241 if (precision == INT_TYPE_SIZE)
00242 return true;
00243 if (precision == LONG_TYPE_SIZE)
00244 return true;
00245 if (precision == LONG_LONG_TYPE_SIZE)
00246 return true;
00247 if (precision == 2 * BITS_PER_WORD)
00248 return true;
00249 return false;
00250
00251 case MODE_FLOAT:
00252 if (precision == FLOAT_TYPE_SIZE)
00253 return true;
00254 if (precision == DOUBLE_TYPE_SIZE)
00255 return true;
00256 if (precision == LONG_DOUBLE_TYPE_SIZE)
00257 return true;
00258 return false;
00259
00260 default:
00261 gcc_unreachable ();
00262 }
00263 }
00264
00265 bool
00266 hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false (
00267 CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
00268 enum machine_mode mode ATTRIBUTE_UNUSED,
00269 tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
00270 {
00271 return false;
00272 }
00273
00274 bool
00275 hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true (
00276 CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
00277 enum machine_mode mode ATTRIBUTE_UNUSED,
00278 tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
00279 {
00280 return true;
00281 }
00282
00283 int
00284 hook_int_CUMULATIVE_ARGS_mode_tree_bool_0 (
00285 CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
00286 enum machine_mode mode ATTRIBUTE_UNUSED,
00287 tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
00288 {
00289 return 0;
00290 }