Commit fbdf817d by Uros Bizjak

re PR target/37197 (-msse4 ICE on __builtin_parityl)

	PR target/37197
	* config/i386/driver-i386.c (processor_signatures): New enum.
	(SIG_GEODE): Move from vendor_signatures to processor_signatures.
	(host_detect_local_cpu): For SIG_AMD vendor, check for SIG_GEODE
	processor signature to detect geode processor.

From-SVN: r147429
parent 5e8d1826
2009-05-12 Uros Bizjak <ubizjak@gmail.com>
PR target/37197
* config/i386/driver-i386.c (processor_signatures): New enum.
(SIG_GEODE): Move from vendor_signatures to processor_signatures.
(host_detect_local_cpu): For SIG_AMD vendor, check for SIG_GEODE
processor signature to detect geode processor.
2009-05-12 Paolo Bonzini <bonzini@gnu.org> 2009-05-12 Paolo Bonzini <bonzini@gnu.org>
Revert: Revert:
...@@ -27,10 +35,11 @@ ...@@ -27,10 +35,11 @@
(prepare_cmp_insn): Return an rtx and a machine mode. Accept (prepare_cmp_insn): Return an rtx and a machine mode. Accept
other parameters by value. Try to widen operands here based on other parameters by value. Try to widen operands here based on
an optab_methods argument and looking at cbranch_optab. an optab_methods argument and looking at cbranch_optab.
(emit_cmp_and_jump_insn_1): Accept test and mode, remove widening loop. (emit_cmp_and_jump_insn_1): Accept test and mode, remove widening
Use cbranch_optab directly. loop. Use cbranch_optab directly.
(emit_cmp_and_jump_insns): Fix comment. Adjust call to prepare_cmp_insn (emit_cmp_and_jump_insns): Fix comment. Adjust call to
and emit_cmp_and_jump_insn_1, remove obsolete assertion. prepare_cmp_insn and emit_cmp_and_jump_insn_1, remove obsolete
assertion.
(emit_conditional_move, emit_conditional_add): Inline what's needed (emit_conditional_move, emit_conditional_add): Inline what's needed
of compare_from_rtx, using new prepare_cmp_insn for the rest. of compare_from_rtx, using new prepare_cmp_insn for the rest.
(init_optabs): Init cmp_optab with UNKNOWN, cbranch_optab (init_optabs): Init cmp_optab with UNKNOWN, cbranch_optab
...@@ -85,8 +94,8 @@ ...@@ -85,8 +94,8 @@
cmp_op_mode == cmp_mode, and simplify accordingly. cmp_op_mode == cmp_mode, and simplify accordingly.
* config/alpha/alpha.h (struct alpha_compare, alpha_compare): Delete. * config/alpha/alpha.h (struct alpha_compare, alpha_compare): Delete.
* config/alpha/alpha.md (cmpdf, cmptf, cmpdi, bCC, sCC): Delete. * config/alpha/alpha.md (cmpdf, cmptf, cmpdi, bCC, sCC): Delete.
(cbranchdf4, cbranchtf4, cbranchdi4, cstoredf4, cstoretf4, (cbranchdf4, cbranchtf4, cbranchdi4, cstoredf4, cstoretf4,cstoredi4):
cstoredi4): Delete. Delete.
(stack probe test): Use cbranchdi4. (stack probe test): Use cbranchdi4.
* config/alpha/predicates.md (alpha_cbranch_operator): New. * config/alpha/predicates.md (alpha_cbranch_operator): New.
...@@ -140,8 +149,8 @@ ...@@ -140,8 +149,8 @@
(*tstdi_v32): Delete. (*tstdi_v32): Delete.
(*cmpdi_non_v32): Add M alternative for operand 1. (*cmpdi_non_v32): Add M alternative for operand 1.
(cmpsi, cmp<mode>): Make private. (cmpsi, cmp<mode>): Make private.
(*tstsi, *tst<mode>_cmp, *tst<mode>_non_cmp, *btst): Wrap (*tstsi, *tst<mode>_cmp, *tst<mode>_non_cmp, *btst): Wrap LHS
LHS with COMPARE. with COMPARE.
(cbranch<mode>4, cbranchdi4, cstore<mode>4): New. (cbranch<mode>4, cbranchdi4, cstore<mode>4): New.
* config/crx/crx.md (cstore<mode>4, cbranchcc4): New. * config/crx/crx.md (cstore<mode>4, cbranchcc4): New.
...@@ -165,10 +174,8 @@ ...@@ -165,10 +174,8 @@
(cmpdi, cmpsi, cmpsf, cmpdf, bCC, sCC): Remove. (cmpdi, cmpsi, cmpsf, cmpdf, bCC, sCC): Remove.
* config/frv/frv-protos.h (frv_emit_cbranch, frv_emit_scc): * config/frv/frv-protos.h (frv_emit_cbranch, frv_emit_scc):
Receive the entire operands array. Receive the entire operands array.
* config/frv/frv.h (frv_compare_op0, * config/frv/frv.h (frv_compare_op0, frv_compare_op1): Delete.
frv_compare_op1): Delete. * config/frv/frv.c (frv_compare_op0, frv_compare_op1): Delete.
* config/frv/frv.c (frv_compare_op0,
frv_compare_op1): Delete.
* config/frv/frv-protos.h (frv_emit_cbranch, frv_emit_scc): * config/frv/frv-protos.h (frv_emit_cbranch, frv_emit_scc):
Get test/op0/op1 from the operands array. Get test/op0/op1 from the operands array.
(frv_emit_cond_move): Get test/op0/op1 from the test_rtx. (frv_emit_cond_move): Get test/op0/op1 from the test_rtx.
...@@ -198,9 +205,9 @@ ...@@ -198,9 +205,9 @@
* config/i386/i386-protos.h (ix86_expand_setcc): Return void. * config/i386/i386-protos.h (ix86_expand_setcc): Return void.
* config/i386/i386.md (cmpti, cmpdi, cmpsi, cmphi, cmpqi, cmpxf, * config/i386/i386.md (cmpti, cmpdi, cmpsi, cmphi, cmpqi, cmpxf,
cmp<MODEF>, cmpcc): Remove. cmp<MODEF>, cmpcc): Remove.
(cbranchti4, cbranchdi4, cbranchsi4, cbranchhi4, cbranchqi4, cbranchxf4, (cbranchti4, cbranchdi4, cbranchsi4, cbranchhi4, cbranchqi4,
cbranch<MODEF>4, cbranchcc4, cstoredi4, cstoresi4, cstorehi4, cbranchxf4, cbranch<MODEF>4, cbranchcc4, cstoredi4, cstoresi4,
cstoreqi4, cstorexf4, cstore<MODEF>4, cstorecc): New. cstorehi4, cstoreqi4, cstorexf4, cstore<MODEF>4, cstorecc): New.
(sCC and bCC expanders): Remove. (sCC and bCC expanders): Remove.
(stack_protect_test): Use cbranchcc4. (stack_protect_test): Use cbranchcc4.
...@@ -225,8 +232,8 @@ ...@@ -225,8 +232,8 @@
use machine mode argument instead of branch_type. Remove dead use machine mode argument instead of branch_type. Remove dead
code for floating-point comparisons. code for floating-point comparisons.
* config/iq2000/iq2000.h (branch_cmp, branch_type): Remove. * config/iq2000/iq2000.h (branch_cmp, branch_type): Remove.
* config/iq2000/iq2000.md (cmpsi, cmpdi, cmpsf, cmpdf, tstsi, * config/iq2000/iq2000.md (cmpsi, cmpdi, cmpsf, cmpdf, tstsi, bCC):
bCC): Remove. Remove.
(cbranchsi4, cstoresi4): New. (cbranchsi4, cstoresi4): New.
* config/iq2000/predicates.md (reg_or_const_operand): New. * config/iq2000/predicates.md (reg_or_const_operand): New.
...@@ -317,7 +324,8 @@ ...@@ -317,7 +324,8 @@
(cmp<GPR:mode>, cmp<SCALARF:mode>): Delete. (cmp<GPR:mode>, cmp<SCALARF:mode>): Delete.
(b<code>): Change to cbranch<GPR:mode>4 and cbranch<SCALARF:mode>4. (b<code>): Change to cbranch<GPR:mode>4 and cbranch<SCALARF:mode>4.
Adjust call to mips_expand_conditional_branch. Adjust call to mips_expand_conditional_branch.
(seq, sne, slt<u>, sle<u>, sgt<u>, sge<u>): Change to cstore<GPR:mode>4. (seq, sne, slt<u>, sle<u>, sgt<u>, sge<u>): Change to
cstore<GPR:mode>4.
* config/mips/mips-protos.h (mips_expand_conditional_branch, * config/mips/mips-protos.h (mips_expand_conditional_branch,
mips_expand_scc, mips_expand_conditional_trap): Adjust prototypes. mips_expand_scc, mips_expand_conditional_trap): Adjust prototypes.
* config/mips/mips.c (cmp_operands): Delete. * config/mips/mips.c (cmp_operands): Delete.
...@@ -450,7 +458,8 @@ ...@@ -450,7 +458,8 @@
* config/sh/predicates.md (sh_float_comparison_operator): New. * config/sh/predicates.md (sh_float_comparison_operator): New.
* config/sh/sh.c (sh_compare_op0, sh_compare_op1): Delete. * config/sh/sh.c (sh_compare_op0, sh_compare_op1): Delete.
(prepare_scc_operands): Rename to... (prepare_scc_operands): Rename to...
(sh_emit_scc_to_t): ... this. Return void. Get op0/op1 from arguments. (sh_emit_scc_to_t): ... this. Return void. Get op0/op1 from
arguments.
(sh_emit_cheap_store_flag): New. (sh_emit_cheap_store_flag): New.
(sh_emit_set_t_insn): New. (sh_emit_set_t_insn): New.
(from_compare): Rename to... (from_compare): Rename to...
...@@ -469,8 +478,7 @@ ...@@ -469,8 +478,7 @@
prepare_scc_operands (now sh_emit_scc_to_t). prepare_scc_operands (now sh_emit_scc_to_t).
(udivdi3): Use cstoresi4. (udivdi3): Use cstoresi4.
(beq_media, bne_media, bge_media, bgtu_media, bgeu_media, beq, (beq_media, bne_media, bge_media, bgtu_media, bgeu_media, beq,
bne, bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu, bunordered): bne, bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu, bunordered): Delete.
Delete.
(cbranchint4_media, cbranchfp4_media): New. (cbranchint4_media, cbranchfp4_media): New.
(casesi): Use cbranchdi4. (casesi): Use cbranchdi4.
(seq, slt, sle, sgt, sge, sgtu, sltu, sgeu, sne, sleu, sunordered): (seq, slt, sle, sgt, sge, sgtu, sltu, sgeu, sne, sleu, sunordered):
...@@ -488,7 +496,8 @@ ...@@ -488,7 +496,8 @@
Do not use sparc_compare_op0/sparc_compare_op1. Do not use sparc_compare_op0/sparc_compare_op1.
(emit_scc_insn, emit_conditional_branch_insn): New. (emit_scc_insn, emit_conditional_branch_insn): New.
(emit_v9_brxx): Make static. Remove useless assertion. (emit_v9_brxx): Make static. Remove useless assertion.
(sparc_emit_float_lib_cmp): Return RTL instead of calling emit_cmp_insn. (sparc_emit_float_lib_cmp): Return RTL instead of calling
emit_cmp_insn.
(sparc_expand_compare_and_swap_12): Use gen_compare_reg_1+cbranchcc4. (sparc_expand_compare_and_swap_12): Use gen_compare_reg_1+cbranchcc4.
* config/sparc/sparc-protos.h (gen_compare_reg, * config/sparc/sparc-protos.h (gen_compare_reg,
sparc_emit_float_lib_cmp): Adjust prototype. sparc_emit_float_lib_cmp): Adjust prototype.
...@@ -671,20 +680,16 @@ ...@@ -671,20 +680,16 @@
cgraph_local_info. cgraph_local_info.
* cgraphunit.c (enum cgraph_order_sort_kind): New enum, broken out * cgraphunit.c (enum cgraph_order_sort_kind): New enum, broken out
of struct cgraph_order_sort. of struct cgraph_order_sort.
* combine.c (enum undo_kind): New enum, broken out of struct * combine.c (enum undo_kind): New enum, broken out of struct undo.
undo.
* cse.c (struct branch_path): Break out of struct * cse.c (struct branch_path): Break out of struct
cse_basic_block_data. cse_basic_block_data.
* except.h (enum eh_region_type): Break out of struct eh_region. * except.h (enum eh_region_type): Break out of struct eh_region.
* gcc.c (enum add_del): Break out of struct modify_target. * gcc.c (enum add_del): Break out of struct modify_target.
* genrecog.c (enum decision_type): Break out of struct * genrecog.c (enum decision_type): Break out of struct decision_test.
decision_test.
* ggc-page.c (struct ggc_pch_ondisk): Break out of struct * ggc-page.c (struct ggc_pch_ondisk): Break out of struct
ggc_pch_data. ggc_pch_data.
* matrix-reorg.c (struct free_info): Break out of struct * matrix-reorg.c (struct free_info): Break out of struct matrix_info.
matrix_info. * regmove.c (enum match_use): New enum, broken out of struct match.
* regmove.c (enum match_use): New enum, broken out of struct
match.
* sched-int.h (enum post_call_group): New enum, broken out of * sched-int.h (enum post_call_group): New enum, broken out of
struct deps. struct deps.
(struct deps_reg): Break out of struct deps. (struct deps_reg): Break out of struct deps.
...@@ -706,8 +711,7 @@ ...@@ -706,8 +711,7 @@
and loc parameters. Change all callers. Change error calls to and loc parameters. Change all callers. Change error calls to
error_at, using loc. For a redefinition, if the location of the error_at, using loc. For a redefinition, if the location of the
original definition is known, report it. Set in_struct and original definition is known, report it. Set in_struct and
struct_types. If -Wc++-compat warn if in sizeof, typeof, or struct_types. If -Wc++-compat warn if in sizeof, typeof, or alignof.
alignof.
(finish_struct): Add new parameters enclosing_in_struct and (finish_struct): Add new parameters enclosing_in_struct and
enclosing_struct_types. Change all callers. Set enclosing_struct_types. Change all callers. Set
C_TYPE_DEFINED_IN_STRUCT for all struct/union/enum types defined C_TYPE_DEFINED_IN_STRUCT for all struct/union/enum types defined
...@@ -717,10 +721,8 @@ ...@@ -717,10 +721,8 @@
location of the original definition is known, report it. If in a location of the original definition is known, report it. If in a
struct, add this enum type to struct_types. If -Wc++-compat warn struct, add this enum type to struct_types. If -Wc++-compat warn
if in sizeof, typeof, or alignof. if in sizeof, typeof, or alignof.
* c-parser.c (disable_extension_diagnostics): Disable * c-parser.c (disable_extension_diagnostics): Disable -Wc++-compat.
-Wc++-compat. (enable_extension_diagnostics): Reenable -Wc++-compat if appropriate.
(enable_extension_diagnostics): Reenable -Wc++-compat if
appropriate.
(c_parser_enum_specifier): Get enum location for start_enum. (c_parser_enum_specifier): Get enum location for start_enum.
(c_parser_struct_or_union_specifier): Get struct location for (c_parser_struct_or_union_specifier): Get struct location for
start_struct. Save in_struct and struct_types status between start_struct. Save in_struct and struct_types status between
...@@ -729,12 +731,10 @@ ...@@ -729,12 +731,10 @@
(c_parser_alignof_expression): Get location of type. (c_parser_alignof_expression): Get location of type.
(c_parser_postfix_expression): Likewise. (c_parser_postfix_expression): Likewise.
(c_parser_postfix_expression_after_paren_type): Add type_loc (c_parser_postfix_expression_after_paren_type): Add type_loc
parameter. Change all callers. Call parameter. Change all callers. Call check_compound_literal_type.
check_compound_literal_type. Use type_loc for error about Use type_loc for error about variable size type.
variable size type. * c-typeck.c (build_external_ref): If -Wc++-compat, warn about a use
* c-typeck.c (build_external_ref): If -Wc++-compat, warn about a of an enum constant from an enum type defined in a struct or union.
use of an enum constant from an enum type defined in a struct or
union.
(c_cast_expr): Add loc parameter. Change all callers. If (c_cast_expr): Add loc parameter. Change all callers. If
-Wc++-compat, warn about defining a type in a cast. -Wc++-compat, warn about defining a type in a cast.
* c-tree.h (C_TYPE_DEFINED_IN_STRUCT): Define. * c-tree.h (C_TYPE_DEFINED_IN_STRUCT): Define.
...@@ -768,7 +768,8 @@ ...@@ -768,7 +768,8 @@
2009-05-10 Jan Hubicka <jh@suse.cz> 2009-05-10 Jan Hubicka <jh@suse.cz>
* tree-inline.c (delete_unreachable_blocks_update_callgraph): Declare. * tree-inline.c (delete_unreachable_blocks_update_callgraph): Declare.
(estimate_move_cost): Assert that it does not get called for VOID_TYPE_P. (estimate_move_cost): Assert that it does not get called for
VOID_TYPE_P.
(estimate_num_insns): Skip VOID types in argument handling. (estimate_num_insns): Skip VOID types in argument handling.
(optimize_inline_calls): Delete unreachable blocks and verify that (optimize_inline_calls): Delete unreachable blocks and verify that
callgraph is valid. callgraph is valid.
...@@ -2080,8 +2081,8 @@ ...@@ -2080,8 +2081,8 @@
(vectorize_loops): Fix comment. Use REPORT_VECTORIZED_LOCATIONS (vectorize_loops): Fix comment. Use REPORT_VECTORIZED_LOCATIONS
and vect_location. Use REPORT_UNVECTORIZED_LOCATIONS and vect_location. Use REPORT_UNVECTORIZED_LOCATIONS
instead REPORT_UNVECTORIZED_LOOPS. instead REPORT_UNVECTORIZED_LOOPS.
* tree-vectorizer.h (enum vect_def_type): Rename vect_invariant_def and * tree-vectorizer.h (enum vect_def_type): Rename vect_invariant_def
vect_loop_def to vect_external_def and vect_internal_def. and vect_loop_def to vect_external_def and vect_internal_def.
(enum verbosity_levels): Rename REPORT_VECTORIZED_LOOPS (enum verbosity_levels): Rename REPORT_VECTORIZED_LOOPS
and REPORT_UNVECTORIZED_LOOPS to REPORT_VECTORIZED_LOCATIONS and and REPORT_UNVECTORIZED_LOOPS to REPORT_VECTORIZED_LOCATIONS and
REPORT_UNVECTORIZED_LOCATIONS. REPORT_UNVECTORIZED_LOCATIONS.
...@@ -2101,8 +2102,9 @@ ...@@ -2101,8 +2102,9 @@
vect_analyze_operations. vect_analyze_operations.
(vect_is_simple_reduction): Use new names. (vect_is_simple_reduction): Use new names.
(vectorizable_live_operation, vect_transform_loop): Likewise. (vectorizable_live_operation, vect_transform_loop): Likewise.
* tree-vect-data-refs.c (vect_check_interleaving): Add a return value to * tree-vect-data-refs.c (vect_check_interleaving): Add a return value
specify whether the data references can be a part of interleaving chain. to specify whether the data references can be a part of interleaving
chain.
(vect_analyze_data_ref_dependence): Use new names. (vect_analyze_data_ref_dependence): Use new names.
(vect_analyze_data_refs_alignment, vect_analyze_data_refs): Likewise. (vect_analyze_data_refs_alignment, vect_analyze_data_refs): Likewise.
(vect_create_addr_base_for_vector_ref): Remove redundant code. (vect_create_addr_base_for_vector_ref): Remove redundant code.
......
...@@ -336,7 +336,11 @@ detect_caches_intel (bool xeon_mp, unsigned max_level, unsigned max_ext_level) ...@@ -336,7 +336,11 @@ detect_caches_intel (bool xeon_mp, unsigned max_level, unsigned max_ext_level)
enum vendor_signatures enum vendor_signatures
{ {
SIG_INTEL = 0x756e6547 /* Genu */, SIG_INTEL = 0x756e6547 /* Genu */,
SIG_AMD = 0x68747541 /* Auth */, SIG_AMD = 0x68747541 /* Auth */
};
enum processor_signatures
{
SIG_GEODE = 0x646f6547 /* Geod */ SIG_GEODE = 0x646f6547 /* Geod */
}; };
...@@ -433,19 +437,27 @@ const char *host_detect_local_cpu (int argc, const char **argv) ...@@ -433,19 +437,27 @@ const char *host_detect_local_cpu (int argc, const char **argv)
if (vendor == SIG_AMD) if (vendor == SIG_AMD)
{ {
processor = PROCESSOR_PENTIUM; unsigned int name;
if (has_mmx) /* Detect geode processor by its processor signature. */
processor = PROCESSOR_K6; if (ext_level > 0x80000001)
if (has_3dnowp) __cpuid (0x80000002, name, ebx, ecx, edx);
processor = PROCESSOR_ATHLON; else
if (has_sse2 || has_longmode) name = 0;
processor = PROCESSOR_K8;
if (has_sse4a) if (name == SIG_GEODE)
processor = PROCESSOR_GEODE;
else if (has_sse4a)
processor = PROCESSOR_AMDFAM10; processor = PROCESSOR_AMDFAM10;
else if (has_sse2 || has_longmode)
processor = PROCESSOR_K8;
else if (has_3dnowp)
processor = PROCESSOR_ATHLON;
else if (has_mmx)
processor = PROCESSOR_K6;
else
processor = PROCESSOR_PENTIUM;
} }
else if (vendor == SIG_GEODE)
processor = PROCESSOR_GEODE;
else else
{ {
switch (family) switch (family)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment