OSDN Git Service

* config/h8300/h8300.md (*movsf_h8300h): Change to
[pf3gnuchains/gcc-fork.git] / gcc / targhooks.c
index 97d0642..9be6786 100644 (file)
@@ -55,15 +55,26 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "rtl.h"
 #include "tree.h"
 #include "expr.h"
+#include "output.h"
 #include "toplev.h"
 #include "function.h"
 #include "target.h"
 #include "tm_p.h"
 #include "target-def.h"
+#include "insn-config.h"
+#include "recog.h"
+#include "ggc.h"
+
+void
+default_external_libcall (rtx fun ATTRIBUTE_UNUSED)
+{
+#ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
+  ASM_OUTPUT_EXTERNAL_LIBCALL(asm_out_file, fun);
+#endif
+}
 
 bool
-default_promote_function_args (fntype)
-     tree fntype ATTRIBUTE_UNUSED;
+default_promote_function_args (tree fntype ATTRIBUTE_UNUSED)
 {
 #ifdef PROMOTE_FUNCTION_ARGS
   return true;
@@ -73,8 +84,7 @@ default_promote_function_args (fntype)
 }
 
 bool
-default_promote_function_return (fntype)
-     tree fntype ATTRIBUTE_UNUSED;
+default_promote_function_return (tree fntype ATTRIBUTE_UNUSED)
 {
 #ifdef PROMOTE_FUNCTION_RETURN
   return true;
@@ -84,8 +94,7 @@ default_promote_function_return (fntype)
 }
 
 bool
-default_promote_prototypes (fntype)
-     tree fntype ATTRIBUTE_UNUSED;
+default_promote_prototypes (tree fntype ATTRIBUTE_UNUSED)
 {
   if (PROMOTE_PROTOTYPES)
     return true;
@@ -189,3 +198,46 @@ default_pretend_outgoing_varargs_named(CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
 #endif
 #endif
 }
+
+/* A SYMBOL_REF for a local symbol.  Used by default_direct_pool_load_p.  */
+
+static GTY(()) rtx pool_symbol;
+
+/* See whether a local symbol is a valid address for MODE.  If so, assume
+   that constant pool symbols are also valid addresses, otherwise assume
+   that they aren't.
+
+   ??? This is only an approximation.  We can't test constant pool
+   symbols directly without forcing something into the constant pool.  */
+
+bool
+default_direct_pool_load_p (enum machine_mode mode)
+{
+  if (pool_symbol == 0)
+    {
+      char label[256];
+
+      ASM_GENERATE_INTERNAL_LABEL (label, "LC", 0);
+      pool_symbol = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (label));
+      SYMBOL_REF_FLAGS (pool_symbol) = SYMBOL_FLAG_LOCAL;
+    }
+  return memory_address_p (mode, pool_symbol);
+}
+
+/* Generic hook that takes a CUMULATIVE_ARGS pointer and returns true.  */
+
+bool
+hook_bool_CUMULATIVE_ARGS_true (CUMULATIVE_ARGS * a ATTRIBUTE_UNUSED)
+{
+  return true;
+}
+
+/* Generic hook that takes a machine mode and returns true.  */
+
+bool
+hook_bool_machine_mode_true (enum machine_mode a ATTRIBUTE_UNUSED)
+{
+  return true;
+}
+
+#include "gt-targhooks.h"