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