aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@st.com>2009-05-20 21:56:57 +0000
committerJ"orn Rennecke <joern.rennecke@st.com>2009-05-20 21:56:57 +0000
commitefbb3ccf41041ade81a9bf0e9b644c6d82e2484d (patch)
tree13cce2eacf63fd9c7becf3644dced8b8badc0929
parent135c3f6808f3cddaf9d5e3ccfdcc949ca6db23ce (diff)
* config/rs6000/rs6000.c (legitimate_indirect_address_p):
Don't define inline. * tree-ssa-address.c: Include multi-target.h . Add START_TARGET_SPECIFIC and END_TARGET_SPECIFIC markers and #ifndef EXTRA_TARGET / #endif directives. * varasm.c (default_target_new_arch) [EXTRA_TARGET]: Don't forward the call, nor suppress output last_arch is 0. * TDEP-SOURCES: Add tree-ssa-address.c . * tree-flow.h: Incude multi-target.h (create_mem_ref, addr_for_mem_ref, maybe_fold_tmr): Mark as target specific. Makefile.in (OBJS-common): Move tree-ssa-address.o from here... (OBJS-rtl): ... to here. * config/spu/spu-protos.h (spu_override_options): Don't declare. * config/spu/spu.c (spu_override_options): Now static. Change signature to fit target hook. (TARGET_OVERRIDE_OPTIONS): Redefine. * config/spu/spu.h: Include multi-target.h. Add START_TARGET_SPECIFIC / END_TARGET_SPECIFIC markers. * config/mxp/mxp.h: Comment typo fix. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/arc-milepost-branch@147752 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.cxx3
-rw-r--r--gcc/ChangeLog.multi-target19
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/TDEP-SOURCES1
-rw-r--r--gcc/config/mxp/mxp.h2
-rw-r--r--gcc/config/rs6000/rs6000.c2
-rw-r--r--gcc/config/spu/spu-protos.h1
-rw-r--r--gcc/config/spu/spu.c12
-rw-r--r--gcc/config/spu/spu.h8
-rw-r--r--gcc/tree-flow.h5
-rw-r--r--gcc/tree-ssa-address.c11
-rw-r--r--gcc/varasm.c7
12 files changed, 61 insertions, 12 deletions
diff --git a/gcc/ChangeLog.cxx b/gcc/ChangeLog.cxx
index c86764441a0..5d51175c0d0 100644
--- a/gcc/ChangeLog.cxx
+++ b/gcc/ChangeLog.cxx
@@ -1,5 +1,8 @@
2009-05-20 J"orn Rennecke <joern.rennecke@arc.com>
+ * config/rs6000/rs6000.c (legitimate_indirect_address_p):
+ Don't define inline.
+
* opt-gen.awk: For all variables with an Init clause, set var_seen.
* config/rs6000/rs6000.c (rs6000_builtin_conversion): Adjust to
target.h declaration.
diff --git a/gcc/ChangeLog.multi-target b/gcc/ChangeLog.multi-target
index 0636d567c79..9abfb704b3c 100644
--- a/gcc/ChangeLog.multi-target
+++ b/gcc/ChangeLog.multi-target
@@ -1,5 +1,24 @@
2009-05-20 J"orn Rennecke <joern.rennecke@arc.com>
+ * tree-ssa-address.c: Include multi-target.h . Add
+ START_TARGET_SPECIFIC and END_TARGET_SPECIFIC markers and
+ #ifndef EXTRA_TARGET / #endif directives.
+ * varasm.c (default_target_new_arch) [EXTRA_TARGET]:
+ Don't forward the call, nor suppress output last_arch is 0.
+ * TDEP-SOURCES: Add tree-ssa-address.c .
+ * tree-flow.h: Incude multi-target.h
+ (create_mem_ref, addr_for_mem_ref, maybe_fold_tmr): Mark as target
+ specific.
+ Makefile.in (OBJS-common): Move tree-ssa-address.o from here...
+ (OBJS-rtl): ... to here.
+ * config/spu/spu-protos.h (spu_override_options): Don't declare.
+ * config/spu/spu.c (spu_override_options): Now static. Change
+ signature to fit target hook.
+ (TARGET_OVERRIDE_OPTIONS): Redefine.
+ * config/spu/spu.h: Include multi-target.h.
+ Add START_TARGET_SPECIFIC / END_TARGET_SPECIFIC markers.
+ * config/mxp/mxp.h: Comment typo fix.
+
* config/rs6000/rs6000.c (rs6000_va_start): Use INCOMING_ARGS_INFO.
(compute_vrsave_mask): Likewise.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 0af8f5a5ef0..420775bc5bf 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1130,6 +1130,7 @@ OBJS-rtl = \
stor-layout.o \
targhooks.o \
toplev.o \
+ tree-ssa-address.o \
var-tracking.o \
varasm.o \
vmsdbgout.o \
@@ -1220,7 +1221,6 @@ OBJS-common = \
tree-scalar-evolution.o \
tree-sra.o \
tree-switch-conversion.o \
- tree-ssa-address.o \
tree-ssa-alias.o \
tree-ssa-ccp.o \
tree-ssa-coalesce.o \
diff --git a/gcc/TDEP-SOURCES b/gcc/TDEP-SOURCES
index b54311f271c..dfe8c544a1b 100644
--- a/gcc/TDEP-SOURCES
+++ b/gcc/TDEP-SOURCES
@@ -121,3 +121,4 @@ varasm.c
var-tracking.c
vmsdbgout.c
web.c
+tree-ssa-address.c
diff --git a/gcc/config/mxp/mxp.h b/gcc/config/mxp/mxp.h
index 46a76656e2d..6b450537858 100644
--- a/gcc/config/mxp/mxp.h
+++ b/gcc/config/mxp/mxp.h
@@ -1,4 +1,4 @@
-/* Don't include multi-target.h fot target-types.h generation. */
+/* Don't include mxp-regset.h for target-types.h generation. */
#if defined(IN_GCC) || defined(GENERATOR_FILE)
#include "mxp-regset.h"
#endif
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 01eb79746c7..233fbd5bb1f 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -3722,7 +3722,7 @@ avoiding_indexed_address_p (enum machine_mode mode)
return TARGET_AVOID_XFORM && !ALTIVEC_VECTOR_MODE (mode);
}
-inline bool
+bool
legitimate_indirect_address_p (rtx x, int strict)
{
return GET_CODE (x) == REG && INT_REG_OK_FOR_BASE_P (x, strict);
diff --git a/gcc/config/spu/spu-protos.h b/gcc/config/spu/spu-protos.h
index 77492f43c59..e42198e8252 100644
--- a/gcc/config/spu/spu-protos.h
+++ b/gcc/config/spu/spu-protos.h
@@ -23,7 +23,6 @@ struct cpp_reader;
extern void spu_cpu_cpp_builtins (struct cpp_reader * pfile);
extern void builtin_define_std (const char *);
extern void spu_optimization_options (int level, int size);
-extern void spu_override_options (void);
extern void spu_c_common_override_options (void);
extern int valid_subreg (rtx op);
extern void spu_expand_extv (rtx * ops, int unsignedp);
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 0b4d5be63ef..e2dd53be868 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -145,6 +145,7 @@ static tree spu_builtin_vec_perm (tree, tree *);
static int spu_sms_res_mii (struct ddg *g);
static void asm_file_start (void);
static unsigned int spu_section_type_flags (tree, const char *, int);
+static bool spu_override_options (bool);
extern const char *reg_names[];
rtx spu_compare_op0, spu_compare_op1;
@@ -334,6 +335,9 @@ extern const struct attribute_spec spu_attribute_table[];
#undef TARGET_SECTION_TYPE_FLAGS
#define TARGET_SECTION_TYPE_FLAGS spu_section_type_flags
+#undef TARGET_OVERRIDE_OPTIONS
+#define TARGET_OVERRIDE_OPTIONS spu_override_options
+
struct gcc_target targetm = TARGET_INITIALIZER;
void
@@ -351,12 +355,13 @@ spu_optimization_options (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED)
on a particular target machine. You can define a macro
OVERRIDE_OPTIONS to take account of this. This macro, if defined, is
executed once just after all the command options have been parsed. */
-void
-spu_override_options (void)
+static bool
+spu_override_options (bool main_target)
{
/* Small loops will be unpeeled at -O3. For SPU it is more important
to keep code small by default. */
- if (!flag_unroll_loops && !flag_peel_loops
+ /* FIXME: this parameter should exist separately for all targets. */
+ if (!flag_unroll_loops && !flag_peel_loops && main_target
&& !PARAM_SET_P (PARAM_MAX_COMPLETELY_PEEL_TIMES))
PARAM_VALUE (PARAM_MAX_COMPLETELY_PEEL_TIMES) = 1;
@@ -406,6 +411,7 @@ spu_override_options (void)
}
REAL_MODE_FORMAT (SFmode) = &spu_single_format;
+ return true;
}
/* Handle an attribute requiring a FUNCTION_DECL; arguments as in
diff --git a/gcc/config/spu/spu.h b/gcc/config/spu/spu.h
index 34585f944dd..149fc466d15 100644
--- a/gcc/config/spu/spu.h
+++ b/gcc/config/spu/spu.h
@@ -15,12 +15,13 @@
<http://www.gnu.org/licenses/>. */
+#include "multi-target.h"
+
/* Run-time Target */
#define TARGET_CPU_CPP_BUILTINS() spu_cpu_cpp_builtins(pfile)
#define TARGET_VERSION fprintf (stderr, " (spu %s)", __DATE__);
-#define OVERRIDE_OPTIONS spu_override_options()
#define C_COMMON_OVERRIDE_OPTIONS spu_c_common_override_options()
#define OPTIMIZATION_OPTIONS(level,size) \
@@ -28,6 +29,7 @@
#define INIT_EXPANDERS spu_init_expanders()
+START_TARGET_SPECIFIC
extern int target_flags;
extern const char *spu_fixed_range_string;
@@ -40,6 +42,7 @@ enum processor_type
extern GTY(()) int spu_arch;
extern GTY(()) int spu_tune;
+END_TARGET_SPECIFIC
/* Support for a compile-time default architecture and tuning. The rules are:
--with-arch is ignored if -march is specified.
@@ -617,8 +620,9 @@ targetm.resolve_overloaded_builtin = spu_resolve_overloaded_builtin; \
} \
} while (0)
+START_TARGET_SPECIFIC
/* These are set by the cmp patterns and used while expanding
conditional branches. */
extern GTY(()) rtx spu_compare_op0;
extern GTY(()) rtx spu_compare_op1;
-
+END_TARGET_SPECIFIC
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 1a5766d6ea5..230b1e836c5 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-ssa-operands.h"
#include "cgraph.h"
#include "ipa-reference.h"
+#include "multi-target.h"
/* Forward declare structures for the garbage collector GTY markers. */
#ifndef GCC_BASIC_BLOCK_H
@@ -1169,11 +1170,13 @@ struct mem_address
};
struct affine_tree_combination;
+START_TARGET_SPECIFIC
tree create_mem_ref (gimple_stmt_iterator *, tree,
struct affine_tree_combination *, bool);
rtx addr_for_mem_ref (struct mem_address *, bool);
-void get_address_description (tree, struct mem_address *);
tree maybe_fold_tmr (tree);
+END_TARGET_SPECIFIC
+void get_address_description (tree, struct mem_address *);
void init_alias_heapvars (void);
void delete_alias_heapvars (void);
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c
index 6c81b09febf..ed6afdd935f 100644
--- a/gcc/tree-ssa-address.c
+++ b/gcc/tree-ssa-address.c
@@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see
#include "expr.h"
#include "ggc.h"
#include "tree-affine.h"
+#include "multi-target.h"
/* TODO -- handling of symbols (according to Richard Hendersons
comments, http://gcc.gnu.org/ml/gcc-patches/2005-04/msg00949.html):
@@ -79,6 +80,8 @@ struct mem_addr_template GTY (())
be filled in. */
};
+START_TARGET_SPECIFIC
+
/* The templates. Each of the five bits of the index corresponds to one
component of TARGET_MEM_REF being present, see TEMPL_IDX. */
@@ -243,6 +246,7 @@ addr_for_mem_ref (struct mem_address *addr, bool really_expand)
return address;
}
+#ifndef EXTRA_TARGET
/* Returns address of MEM_REF in TYPE. */
tree
@@ -301,6 +305,7 @@ tree_mem_ref_addr (tree type, tree mem_ref)
return addr;
}
+#endif /* !EXTRA_TARGET */
/* Returns true if a memory reference in MODE and with parameters given by
ADDR is valid on the current target. */
@@ -692,6 +697,7 @@ create_mem_ref (gimple_stmt_iterator *gsi, tree type, aff_tree *addr,
gcc_unreachable ();
}
+#ifndef EXTRA_TARGET
/* Copies components of the address from OP to ADDR. */
void
@@ -715,6 +721,7 @@ copy_mem_ref_info (tree to, tree from)
/* And the info about the original reference. */
TMR_ORIGINAL (to) = TMR_ORIGINAL (from);
}
+#endif /* !EXTRA_TARGET */
/* Move constants in target_mem_ref REF to offset. Returns the new target
mem ref if anything changes, NULL_TREE otherwise. */
@@ -774,6 +781,7 @@ maybe_fold_tmr (tree ref)
return ret;
}
+#ifndef EXTRA_TARGET
/* Dump PARTS to FILE. */
extern void dump_mem_address (FILE *, struct mem_address *);
@@ -811,5 +819,8 @@ dump_mem_address (FILE *file, struct mem_address *parts)
fprintf (file, "\n");
}
}
+#endif /* EXTRA_TARGET */
#include "gt-tree-ssa-address.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 79ca8ec7aaa..561372d5fc9 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1637,10 +1637,13 @@ default_target_new_arch (FILE *out_file,
struct gcc_target *last_arch,
struct gcc_target *new_arch)
{
+#ifndef EXTRA_TARGET
if (&targetm != &this_targetm)
targetm.asm_out.new_arch (out_file, last_arch, new_arch);
- else if (last_arch != new_arch && last_arch)
- fprintf (out_file, "\t.arch\t\"%s\"\n", new_arch->name);
+ else if (last_arch)
+#endif
+ if (last_arch != new_arch)
+ fprintf (out_file, "\t.arch\t\"%s\"\n", new_arch->name);
}
/* Output assembler code for the constant pool of a function and associated