PATCH: Fix bootstrap on x86

Message ID
State New
Headers show

Commit Message

H.J. Lu Sept. 13, 2010, 8:53 p.m.
On Mon, Sep 13, 2010 at 1:38 PM, Andrew Pinski <> wrote:
> On Mon, Sep 13, 2010 at 1:35 PM, H.J. Lu <> wrote:
>>>>        * config/i386/i386.h (ix86_tune_indices): Likewise.
>>>>        (UNITS_PER_SIMD_WORD): Defined with ix86_units_per_simd_word.
> I think it is time to change UNITS_PER_SIMD_WORD into a target hook
> rather than including tm_p.h everywhere.

I can change it to a target hook.

BTW,  I am enclosing the complete patch with ChangeLog.


diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index 43c86e8..9004531 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -38,6 +38,8 @@  extern void ix86_output_addr_diff_elt (FILE *, int, int);
 extern enum calling_abi ix86_cfun_abi (void);
 extern enum calling_abi ix86_function_type_abi (const_tree);
+extern unsigned int ix86_units_per_simd_word (enum machine_mode);
 #ifdef RTX_CODE
 extern int standard_80387_constant_p (rtx);
 extern const char *standard_80387_constant_opcode (rtx);
@@ -50,7 +52,6 @@  extern bool x86_extended_QIreg_mentioned_p (rtx);
 extern bool x86_extended_reg_mentioned_p (rtx);
 extern bool x86_maybe_negate_const_int (rtx *, enum machine_mode);
 extern enum machine_mode ix86_cc_mode (enum rtx_code, rtx, rtx);
-extern unsigned int ix86_units_per_simd_word (enum machine_mode);
 extern int avx_vpermilp_parallel (rtx par, enum machine_mode mode);
 extern int avx_vperm2f128_parallel (rtx par, enum machine_mode mode);
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 6d15bda..be5dec0 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -26,6 +26,7 @@  along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "ggc.h"
 #include "tree.h"
+#include "tm_p.h"
 #include "target.h"
 #include "basic-block.h"
 #include "tree-pretty-print.h"