OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / target.h
index f160e97..e3307e8 100644 (file)
@@ -1,5 +1,6 @@
 /* Data structure definitions for a generic GCC target.
-   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+   2011, 2012
    Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
 #ifndef GCC_TARGET_H
 #define GCC_TARGET_H
 
-#include "tm.h"
 #include "insn-modes.h"
 
+#ifdef ENABLE_CHECKING
+
+typedef struct { void *magic; void *p; } cumulative_args_t;
+
+#else /* !ENABLE_CHECKING */
+
+/* When using a GCC build compiler, we could use
+   __attribute__((transparent_union)) to get cumulative_args_t function
+   arguments passed like scalars where the ABI would mandate a less
+   efficient way of argument passing otherwise.  However, that would come
+   at the cost of less type-safe !ENABLE_CHECKING compilation.  */
+
+typedef union { void *p; } cumulative_args_t;
+
+#endif /* !ENABLE_CHECKING */
+
 /* Types used by the record_gcc_switches() target function.  */
 typedef enum
 {
@@ -76,6 +92,7 @@ extern bool target_default_pointer_address_modes_p (void);
 
 struct stdarg_info;
 struct spec_info_def;
+struct hard_reg_set_container;
 
 /* The struct used by the secondary_reload target hook.  */
 typedef struct secondary_reload_info
@@ -100,6 +117,9 @@ struct ddg;
 /* This is defined in cfgloop.h .  */
 struct loop;
 
+/* This is defined in tree-ssa-alias.h.  */
+struct ao_ref_s;
+
 /* Assembler instructions for creating various kinds of integer object.  */
 
 struct asm_int_op
@@ -125,17 +145,8 @@ enum vect_cost_for_stmt
   scalar_to_vec,
   cond_branch_not_taken,
   cond_branch_taken,
-  vec_perm
-};
-
-/* Types of unwind/exception handling info that can be generated.  */
-
-enum unwind_info_type
-{
-  UI_NONE,
-  UI_SJLJ,
-  UI_DWARF2,
-  UI_TARGET
+  vec_perm,
+  vec_promote_demote
 };
 
 /* The target structure.  This holds all the backend hooks.  */
@@ -148,7 +159,32 @@ enum unwind_info_type
 
 extern struct gcc_target targetm;
 
-/* Each target can provide their own.  */
-extern struct gcc_targetcm targetcm;
+#ifdef GCC_TM_H
+
+#ifndef CUMULATIVE_ARGS_MAGIC
+#define CUMULATIVE_ARGS_MAGIC ((void *) &targetm.calls)
+#endif
+
+static inline CUMULATIVE_ARGS *
+get_cumulative_args (cumulative_args_t arg)
+{
+#ifdef ENABLE_CHECKING
+  gcc_assert (arg.magic == CUMULATIVE_ARGS_MAGIC);
+#endif /* ENABLE_CHECKING */
+  return (CUMULATIVE_ARGS *) arg.p;
+}
+
+static inline cumulative_args_t
+pack_cumulative_args (CUMULATIVE_ARGS *arg)
+{
+  cumulative_args_t ret;
+
+#ifdef ENABLE_CHECKING
+  ret.magic = CUMULATIVE_ARGS_MAGIC;
+#endif /* ENABLE_CHECKING */
+  ret.p = (void *) arg;
+  return ret;
+}
+#endif /* GCC_TM_H */
 
 #endif /* GCC_TARGET_H */