gcc/gcc/genpreds.c

1671 lines
46 KiB
C
Raw Normal View History

/* Generate from machine description:
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
- prototype declarations for operand predicates (tm-preds.h)
- function definitions of operand predicates, if defined new-style
(insn-preds.c)
Copyright (C) 2001-2017 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "bconfig.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
#include "errors.h"
#include "obstack.h"
Makefile.in (READ_MD_H): New variable. gcc/ * Makefile.in (READ_MD_H): New variable. (BUILD_RTL): Add build/read-md.o. (lto-wrapper.o): Depend on coretypes.h instead of defaults.h. (build/gensupport.o, build/read-rtl.o, build/genattr.o) (build/genattrtab.o, build/genconditions.o build/genemit.o) (build/genextract.o, build/genflags.o, build/genoutput.o) (build/genpreds.o, build/genrecog.o): Depend on $(READ_MD_H). (build/read-md.o): New rule. * defaults.h (obstack_chunk_alloc, obstack_chunk_free) (OBSTACK_CHUNK_SIZE, gcc_obstack_init): Move to... * coretypes.h: ...here. * lto-wrapper.c: Include coretypes.h instead of defaults.h. * pretty-print.c (obstack_chunk_alloc, obstack_chunk_free): Delete. * genattr.c: Include read-md.h. * genattrtab.c: Likewise. * genconditions.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * genflags.c: Likewise. * genoutput.c: Likewise. * genpreds.c: Likewise. * genrecog.c: Likewise. * rtl.h (read_skip_spaces, copy_rtx_ptr_loc, print_rtx_ptr_loc) (join_c_conditions, print_c_condition, read_rtx_filename) (read_rtx_lineno): Move to read-md.h. * read-rtl.c: Include read-md.h. (ptr_loc, string_obstack, ptr_locs, ptr_loc_obstack) (joined_conditions, joined_conditions_obstack, read_rtx_lineno) (read_rtx_filename, fatal_with_file_and_line, fatal_expected_char) (leading_ptr_hash, leading_ptr_eq_p, set_rtx_ptr_loc, get_rtx_ptr_loc) (copy_rtx_ptr_loc, print_rtx_ptr_loc, join_c_conditions) (print_c_condition, read_skip_spaces, read_escape, read_quoted_string) (read_braced_string, read_string): Move to read-md.c. (read_rtx): Move some initialization to init_md_reader and call init_md_reader here. * gensupport.h (message_with_line, n_comma_elts, scan_comma_elt): Move to read-md.h. * gensupport.c: Include read-md.h. (message_with_line, n_comma_elts, scan_comma_elt): Move to read-md.c. * read-md.h, read-md.c: New files. From-SVN: r160570
2010-06-10 22:21:23 +02:00
#include "read-md.h"
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
#include "gensupport.h"
common.md: New file. gcc/ * common.md: New file. * doc/md.texi: Update description of generic, machine-independent constraints. * config/s390/constraints.md (e): Delete. * Makefile.in (md_file): Include common.md. * config/m32c/t-m32c (md_file): Likewise. * genpreds.c (general_mem): New array. (generic_constraint_letters): Remove constraints now defined by common.md. (add_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Allow the first character to be '<' or '>' as well. * genoutput.c (general_mem): New array. (indep_constraints): Remove constraints now defined by common.md. (note_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Remove special handling of 'm'. * ira-costs.c (record_reg_classes): Remove special handling of constraints now defined by common.md. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * lra-constraints.c (reg_class_from_constraints): Likewise. (process_alt_operands, process_address, curr_insn_transform): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * reload.c (push_secondary_reload, scratch_reload_class) (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * targhooks.c (default_secondary_reload): Likewise. * stmt.c (parse_output_constraint): Likewise. * recog.c (preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. (asm_operand_ok): Likewise, but add a comment saying why 'o' must be handled specially. From-SVN: r211475
2014-06-11 18:59:17 +02:00
static char general_mem[] = { TARGET_MEM_CONSTRAINT, 0 };
/* Given a predicate expression EXP, from form NAME at location LOC,
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
verify that it does not contain any RTL constructs which are not
valid in predicate definitions. Returns true if EXP is
INvalid; issues error messages, caller need not. */
static bool
validate_exp (rtx exp, const char *name, file_location loc)
{
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
if (exp == 0)
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
{
message_at (loc, "%s: must give a predicate expression", name);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return true;
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
}
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
switch (GET_CODE (exp))
{
/* Ternary, binary, unary expressions: recurse into subexpressions. */
case IF_THEN_ELSE:
if (validate_exp (XEXP (exp, 2), name, loc))
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return true;
re PR c/7652 (-Wswitch-break : Warn if a switch case falls through) PR c/7652 gcc/ * alias.c (find_base_value): Adjust fall through comment. * cfgexpand.c (expand_debug_expr): Likewise. * combine.c (find_split_point): Likewise. (expand_compound_operation): Likewise. Add FALLTHRU. (make_compound_operation): Adjust fall through comment. (canon_reg_for_combine): Add FALLTHRU. (force_to_mode): Adjust fall through comment. (simplify_shift_const_1): Likewise. (simplify_comparison): Likewise. * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Add FALLTHRU. * config/aarch64/predicates.md: Likewise. * config/i386/i386.c (function_arg_advance_32): Likewise. (ix86_gimplify_va_arg): Likewise. (print_reg): Likewise. (ix86_print_operand): Likewise. (ix86_build_const_vector): Likewise. (ix86_expand_branch): Likewise. (ix86_sched_init_global): Adjust fall through comment. (ix86_expand_args_builtin): Add FALLTHRU. (ix86_expand_builtin): Likewise. (ix86_expand_vector_init_one_var): Likewise. * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise. (rs6000_adjust_cost): Likewise. (insn_must_be_first_in_group): Likewise. * config/rs6000/rs6000.md: Likewise. Adjust fall through comment. * dbxout.c (dbxout_symbol): Adjust fall through comment. * df-scan.c (df_uses_record): Likewise. * dojump.c (do_jump): Add FALLTHRU. * dwarf2out.c (mem_loc_descriptor): Likewise. Adjust fall through comment. (resolve_args_picking_1): Adjust fall through comment. (loc_list_from_tree_1): Likewise. * expmed.c (make_tree): Likewise. * expr.c (expand_expr_real_2): Add FALLTHRU. (expand_expr_real_1): Likewise. Adjust fall through comment. * fold-const.c (const_binop): Adjust fall through comment. (fold_truth_not_expr): Likewise. (fold_cond_expr_with_comparison): Add FALLTHRU. (fold_binary_loc): Likewise. (contains_label_1): Adjust fall through comment. (multiple_of_p): Likewise. * gcov-tool.c (process_args): Add FALLTHRU. * genattrtab.c (check_attr_test): Likewise. (write_test_expr): Likewise. * genconfig.c (walk_insn_part): Likewise. * genpreds.c (validate_exp): Adjust fall through comment. (needs_variable): Likewise. * gensupport.c (get_alternatives_number): Add FALLTHRU. (subst_dup): Likewise. * gimple-pretty-print.c (dump_gimple_assign): Likewise. * gimplify.c (gimplify_addr_expr): Adjust fall through comment. (gimplify_scan_omp_clauses): Add FALLTHRU. (goa_stabilize_expr): Likewise. * graphite-isl-ast-to-gimple.c (substitute_ssa_name): Adjust fall through comment. * hsa-gen.c (get_address_from_value): Likewise. * ipa-icf.c (sem_function::hash_stmt): Likewise. * ira.c (ira_setup_alts): Add FALLTHRU. * lra-eliminations.c (lra_eliminate_regs_1): Adjust fall through comment. * lto-streamer-out.c (lto_output_tree_ref): Add FALLTHRU. * opts.c (common_handle_option): Likewise. * read-rtl.c (read_rtx_code): Likewise. * real.c (round_for_format): Likewise. * recog.c (asm_operand_ok): Likewise. * reginfo.c (reg_scan_mark_refs): Adjust fall through comment. * reload1.c (set_label_offsets): Likewise. (eliminate_regs_1): Likewise. (reload_reg_reaches_end_p): Likewise. * rtlanal.c (commutative_operand_precedence): Add FALLTHRU. (rtx_cost): Likewise. * sched-rgn.c (is_exception_free): Likewise. * simplify-rtx.c (simplify_rtx): Adjust fall through comment. * stor-layout.c (int_mode_for_mode): Likewise. * toplev.c (print_to_asm_out_file): Likewise. (print_to_stderr): Likewise. * tree-cfg.c (gimple_verify_flow_info): Likewise. * tree-chrec.c (chrec_fold_plus_1): Add FALLTHRU. (chrec_fold_multiply): Likewise. (evolution_function_is_invariant_rec_p): Likewise. (for_each_scev_op): Likewise. * tree-data-ref.c (siv_subscript_p): Likewise. (get_references_in_stmt): Likewise. * tree.c (find_placeholder_in_expr): Adjust fall through comment. (substitute_in_expr): Likewise. (type_cache_hasher::equal): Likewise. (walk_type_fields): Likewise. * var-tracking.c (adjust_mems): Add FALLTHRU. (set_dv_changed): Adjust fall through comment. * varasm.c (default_function_section): Add FALLTHRU. gcc/c-family/ * c-common.c (scalar_to_vector): Adjust fall through comment. * c-opts.c (c_common_handle_option): Likewise. * c-pragma.c (handle_pragma_pack): Add FALLTHRU. * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust fall through comment. * cilk.c (extract_free_variables): Add FALLTHRU. gcc/c/ * c-parser.c (c_parser_external_declaration): Add FALLTHRU. (c_parser_postfix_expression): Likewise. * c-typeck.c (build_unary_op): Adjust fall through comment. (c_mark_addressable): Likewise. gcc/cp/ * call.c (add_builtin_candidate): Add FALLTHRU. (build_integral_nontype_arg_conv): Adjust fall through comment. (build_new_op_1): Add FALLTHRU. (convert_like_real): Adjust fall through comment. * class.c (fixed_type_or_null): Likewise. * constexpr.c (cxx_eval_constant_expression): Likewise. (potential_constant_expression_1): Likewise. Add FALLTHRU. * cp-gimplify.c (cp_gimplify_expr): Adjust fall through comment. (cp_fold): Add FALLTHRU. * cvt.c (build_expr_type_conversion): Adjust fall through comment. * cxx-pretty-print.c (pp_cxx_unqualified_id): Add FALLTHRU. (pp_cxx_qualified_id): Likewise. (cxx_pretty_printer::constant): Adjust fall through comment. (cxx_pretty_printer::primary_expression): Add FALLTHRU. (pp_cxx_pm_expression): Adjust fall through comment. (cxx_pretty_printer::expression): Add FALLTHRU. (cxx_pretty_printer::declaration_specifiers): Reformat code. (pp_cxx_type_specifier_seq): Adjust fall through comment. (pp_cxx_ptr_operator): Likewise. Add FALLTHRU. * error.c (dump_type): Adjust fall through comment. (dump_decl): Likewise. * mangle.c (write_type): Likewise. * method.c (synthesized_method_walk): Add FALLTHRU. * name-lookup.c (arg_assoc_type): Likewise. * parser.c (cp_lexer_print_token): Adjust fall through comment. (cp_parser_primary_expression): Add FALLTHRU. (cp_parser_operator): Likewise. * pt.c (find_parameter_packs_r): Likewise. (tsubst_aggr_type): Adjust fall through comment. * semantics.c (finish_omp_clauses): Add FALLTHRU. * tree.c (lvalue_kind): Likewise. gcc/fortran/ * decl.c (match_attr_spec): Add FALLTHRU. * primary.c (match_arg_list_function): Likewise. * resolve.c (resolve_operator): Adjust fall through comment. (fixup_charlen): Add FALLTHRU. (resolve_allocate_expr): Adjust fall through comment. * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU. * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through comment. gcc/java/ * expr.c (java_truthvalue_conversion): Adjust fall through comment. * jcf-io.c (verify_constant_pool): Likewise. * typeck.c (promote_type): Likewise. gcc/objc/ * objc-encoding.c (encode_type): Add FALLTHRU. libcpp/ * lex.c (search_line_fast): Add FALLTHRU. (_cpp_lex_direct): Likewise. (cpp_token_val_index): Adjust fall through comment. * macro.c (parse_params): Add FALLTHRU. * pch.c (count_defs): Adjust fall through comment. (write_defs): Likewise. libiberty/ * cp-demangle.c (d_print_mod): Add FALLTHRU. From-SVN: r239410
2016-08-12 12:30:47 +02:00
/* fall through */
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
case AND:
case IOR:
if (validate_exp (XEXP (exp, 1), name, loc))
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return true;
re PR c/7652 (-Wswitch-break : Warn if a switch case falls through) PR c/7652 gcc/ * alias.c (find_base_value): Adjust fall through comment. * cfgexpand.c (expand_debug_expr): Likewise. * combine.c (find_split_point): Likewise. (expand_compound_operation): Likewise. Add FALLTHRU. (make_compound_operation): Adjust fall through comment. (canon_reg_for_combine): Add FALLTHRU. (force_to_mode): Adjust fall through comment. (simplify_shift_const_1): Likewise. (simplify_comparison): Likewise. * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Add FALLTHRU. * config/aarch64/predicates.md: Likewise. * config/i386/i386.c (function_arg_advance_32): Likewise. (ix86_gimplify_va_arg): Likewise. (print_reg): Likewise. (ix86_print_operand): Likewise. (ix86_build_const_vector): Likewise. (ix86_expand_branch): Likewise. (ix86_sched_init_global): Adjust fall through comment. (ix86_expand_args_builtin): Add FALLTHRU. (ix86_expand_builtin): Likewise. (ix86_expand_vector_init_one_var): Likewise. * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise. (rs6000_adjust_cost): Likewise. (insn_must_be_first_in_group): Likewise. * config/rs6000/rs6000.md: Likewise. Adjust fall through comment. * dbxout.c (dbxout_symbol): Adjust fall through comment. * df-scan.c (df_uses_record): Likewise. * dojump.c (do_jump): Add FALLTHRU. * dwarf2out.c (mem_loc_descriptor): Likewise. Adjust fall through comment. (resolve_args_picking_1): Adjust fall through comment. (loc_list_from_tree_1): Likewise. * expmed.c (make_tree): Likewise. * expr.c (expand_expr_real_2): Add FALLTHRU. (expand_expr_real_1): Likewise. Adjust fall through comment. * fold-const.c (const_binop): Adjust fall through comment. (fold_truth_not_expr): Likewise. (fold_cond_expr_with_comparison): Add FALLTHRU. (fold_binary_loc): Likewise. (contains_label_1): Adjust fall through comment. (multiple_of_p): Likewise. * gcov-tool.c (process_args): Add FALLTHRU. * genattrtab.c (check_attr_test): Likewise. (write_test_expr): Likewise. * genconfig.c (walk_insn_part): Likewise. * genpreds.c (validate_exp): Adjust fall through comment. (needs_variable): Likewise. * gensupport.c (get_alternatives_number): Add FALLTHRU. (subst_dup): Likewise. * gimple-pretty-print.c (dump_gimple_assign): Likewise. * gimplify.c (gimplify_addr_expr): Adjust fall through comment. (gimplify_scan_omp_clauses): Add FALLTHRU. (goa_stabilize_expr): Likewise. * graphite-isl-ast-to-gimple.c (substitute_ssa_name): Adjust fall through comment. * hsa-gen.c (get_address_from_value): Likewise. * ipa-icf.c (sem_function::hash_stmt): Likewise. * ira.c (ira_setup_alts): Add FALLTHRU. * lra-eliminations.c (lra_eliminate_regs_1): Adjust fall through comment. * lto-streamer-out.c (lto_output_tree_ref): Add FALLTHRU. * opts.c (common_handle_option): Likewise. * read-rtl.c (read_rtx_code): Likewise. * real.c (round_for_format): Likewise. * recog.c (asm_operand_ok): Likewise. * reginfo.c (reg_scan_mark_refs): Adjust fall through comment. * reload1.c (set_label_offsets): Likewise. (eliminate_regs_1): Likewise. (reload_reg_reaches_end_p): Likewise. * rtlanal.c (commutative_operand_precedence): Add FALLTHRU. (rtx_cost): Likewise. * sched-rgn.c (is_exception_free): Likewise. * simplify-rtx.c (simplify_rtx): Adjust fall through comment. * stor-layout.c (int_mode_for_mode): Likewise. * toplev.c (print_to_asm_out_file): Likewise. (print_to_stderr): Likewise. * tree-cfg.c (gimple_verify_flow_info): Likewise. * tree-chrec.c (chrec_fold_plus_1): Add FALLTHRU. (chrec_fold_multiply): Likewise. (evolution_function_is_invariant_rec_p): Likewise. (for_each_scev_op): Likewise. * tree-data-ref.c (siv_subscript_p): Likewise. (get_references_in_stmt): Likewise. * tree.c (find_placeholder_in_expr): Adjust fall through comment. (substitute_in_expr): Likewise. (type_cache_hasher::equal): Likewise. (walk_type_fields): Likewise. * var-tracking.c (adjust_mems): Add FALLTHRU. (set_dv_changed): Adjust fall through comment. * varasm.c (default_function_section): Add FALLTHRU. gcc/c-family/ * c-common.c (scalar_to_vector): Adjust fall through comment. * c-opts.c (c_common_handle_option): Likewise. * c-pragma.c (handle_pragma_pack): Add FALLTHRU. * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust fall through comment. * cilk.c (extract_free_variables): Add FALLTHRU. gcc/c/ * c-parser.c (c_parser_external_declaration): Add FALLTHRU. (c_parser_postfix_expression): Likewise. * c-typeck.c (build_unary_op): Adjust fall through comment. (c_mark_addressable): Likewise. gcc/cp/ * call.c (add_builtin_candidate): Add FALLTHRU. (build_integral_nontype_arg_conv): Adjust fall through comment. (build_new_op_1): Add FALLTHRU. (convert_like_real): Adjust fall through comment. * class.c (fixed_type_or_null): Likewise. * constexpr.c (cxx_eval_constant_expression): Likewise. (potential_constant_expression_1): Likewise. Add FALLTHRU. * cp-gimplify.c (cp_gimplify_expr): Adjust fall through comment. (cp_fold): Add FALLTHRU. * cvt.c (build_expr_type_conversion): Adjust fall through comment. * cxx-pretty-print.c (pp_cxx_unqualified_id): Add FALLTHRU. (pp_cxx_qualified_id): Likewise. (cxx_pretty_printer::constant): Adjust fall through comment. (cxx_pretty_printer::primary_expression): Add FALLTHRU. (pp_cxx_pm_expression): Adjust fall through comment. (cxx_pretty_printer::expression): Add FALLTHRU. (cxx_pretty_printer::declaration_specifiers): Reformat code. (pp_cxx_type_specifier_seq): Adjust fall through comment. (pp_cxx_ptr_operator): Likewise. Add FALLTHRU. * error.c (dump_type): Adjust fall through comment. (dump_decl): Likewise. * mangle.c (write_type): Likewise. * method.c (synthesized_method_walk): Add FALLTHRU. * name-lookup.c (arg_assoc_type): Likewise. * parser.c (cp_lexer_print_token): Adjust fall through comment. (cp_parser_primary_expression): Add FALLTHRU. (cp_parser_operator): Likewise. * pt.c (find_parameter_packs_r): Likewise. (tsubst_aggr_type): Adjust fall through comment. * semantics.c (finish_omp_clauses): Add FALLTHRU. * tree.c (lvalue_kind): Likewise. gcc/fortran/ * decl.c (match_attr_spec): Add FALLTHRU. * primary.c (match_arg_list_function): Likewise. * resolve.c (resolve_operator): Adjust fall through comment. (fixup_charlen): Add FALLTHRU. (resolve_allocate_expr): Adjust fall through comment. * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU. * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through comment. gcc/java/ * expr.c (java_truthvalue_conversion): Adjust fall through comment. * jcf-io.c (verify_constant_pool): Likewise. * typeck.c (promote_type): Likewise. gcc/objc/ * objc-encoding.c (encode_type): Add FALLTHRU. libcpp/ * lex.c (search_line_fast): Add FALLTHRU. (_cpp_lex_direct): Likewise. (cpp_token_val_index): Adjust fall through comment. * macro.c (parse_params): Add FALLTHRU. * pch.c (count_defs): Adjust fall through comment. (write_defs): Likewise. libiberty/ * cp-demangle.c (d_print_mod): Add FALLTHRU. From-SVN: r239410
2016-08-12 12:30:47 +02:00
/* fall through */
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
case NOT:
return validate_exp (XEXP (exp, 0), name, loc);
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
/* MATCH_CODE might have a syntax error in its path expression. */
case MATCH_CODE:
{
const char *p;
for (p = XSTR (exp, 1); *p; p++)
{
if (!ISDIGIT (*p) && !ISLOWER (*p))
{
error_at (loc, "%s: invalid character in path "
"string '%s'", name, XSTR (exp, 1));
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return true;
}
}
}
gcc_fallthrough ();
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
/* These need no special checking. */
case MATCH_OPERAND:
case MATCH_TEST:
return false;
default:
error_at (loc, "%s: cannot use '%s' in a predicate expression",
name, GET_RTX_NAME (GET_CODE (exp)));
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return true;
}
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
}
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
/* Predicates are defined with (define_predicate) or
(define_special_predicate) expressions in the machine description. */
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
static void
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
process_define_predicate (md_rtx_info *info)
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
{
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
validate_exp (XEXP (info->def, 1), XSTR (info->def, 0), info->loc);
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
}
/* Given a predicate, if it has an embedded C block, write the block
out as a static inline subroutine, and augment the RTL test with a
match_test that calls that subroutine. For instance,
(define_predicate "basereg_operand"
(match_operand 0 "register_operand")
{
if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op);
return REG_POINTER (op);
})
becomes
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
static inline int basereg_operand_1(rtx op, machine_mode mode)
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
{
if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op);
return REG_POINTER (op);
}
(define_predicate "basereg_operand"
(and (match_operand 0 "register_operand")
(match_test "basereg_operand_1 (op, mode)")))
The only wart is that there's no way to insist on a { } string in
an RTL template, so we have to handle "" strings. */
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
static void
write_predicate_subfunction (struct pred_data *p)
{
const char *match_test_str;
rtx match_test_exp, and_exp;
if (p->c_block[0] == '\0')
return;
/* Construct the function-call expression. */
obstack_grow (rtl_obstack, p->name, strlen (p->name));
obstack_grow (rtl_obstack, "_1 (op, mode)",
sizeof "_1 (op, mode)");
match_test_str = XOBFINISH (rtl_obstack, const char *);
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
/* Add the function-call expression to the complete expression to be
evaluated. */
match_test_exp = rtx_alloc (MATCH_TEST);
XSTR (match_test_exp, 0) = match_test_str;
and_exp = rtx_alloc (AND);
XEXP (and_exp, 0) = p->exp;
XEXP (and_exp, 1) = match_test_exp;
p->exp = and_exp;
printf ("static inline int\n"
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
"%s_1 (rtx op, machine_mode mode ATTRIBUTE_UNUSED)\n",
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
p->name);
read-md.c: Move various state to within class rtx_reader gcc/ChangeLog: * genattrtab.c (attr_string): Use rtx_reader_ptr for call to copy_md_ptr_loc. (gen_attr): Use rtx_reader_ptr for lookup_enum_type call. (write_test_expr): Use rtx_reader_ptr for calls to fprint_c_condition. (write_attr_value): Likewise. * genconditions.c (write_one_condition): Use rtx_reader_ptr for call to print_md_ptr_loc. (write_one_condition): Likewise for calls to print_c_condition. * genconstants.c: Include "statistics.h" and "vec.h". (main): Update for conversion to member functions. * genemit.c (emit_c_code): Use rtx_reader_ptr for call to print_md_ptr_loc. * genenums.c: Include "statistics.h" and "vec.h". (main): Update for conversion of traverse_enum_types to a method. * genmddeps.c: Include "statistics.h" and "vec.h". * genoutput.c (process_template): Use rtx_reader_ptr for call to print_md_ptr_loc. * genpreds.c (write_predicate_subfunction): Likewise. (write_predicate_expr): Likewise for calls to print_c_condition. * genrecog.c (print_test): Likewise. * gensupport.c (process_rtx): Likewise for calls to copy_md_ptr_loc and join_c_conditions. (alter_test_for_insn): Likewise for call to join_c_conditions. (process_substs_on_one_elem): Likewise. (gen_mnemonic_setattr): Update for move of string_obstack to a field of rtx_reader. (mnemonic_htab_callback): Likewise. Fix formatting. (gen_mnemonic_attr): Likewise. * gentarget-def.c (def_target_insn): Use rtx_reader_ptr for calls to print_c_condition. * read-md.c: Include "statistics.h" and "vec.h". (string_obstack): Convert this global to field "m_string_obstack" of class rtx_reader. (ptr_locs): Likewise, as "m_ptr_locs". (ptr_loc_obstack): Likewise, as "m_ptr_loc_obstack". (joined_conditions): Likewise, as "m_joined_conditions". (joined_conditions_obstack): Likewise, as "m_joined_conditions_obstack". (md_constants): Likewise, as "m_md_constants". (enum_types): Likewise, as "m_enum_types". (set_md_ptr_loc): Convert to... (rtx_reader::set_md_ptr_loc): ...member function. (get_md_ptr_loc): Convert to... (rtx_reader::get_md_ptr_loc): ...member function. (copy_md_ptr_loc): Convert to... (rtx_reader::copy_md_ptr_loc): ...member function. (fprint_md_ptr_loc): Convert to... (rtx_reader::fprint_md_ptr_loc): ...member function. (print_md_ptr_loc): Convert to... (rtx_reader::print_md_ptr_loc): ...member function. (join_c_conditions): Convert to... (rtx_reader::join_c_conditions): ...member function. (fprint_c_condition): Convert to... (rtx_reader::fprint_c_condition): ...member function. (print_c_condition): Convert to... (rtx_reader::print_c_condition): ...member function. (read_name): Convert to... (rtx_reader::read_name): ...member function. (read_escape): Convert to... (rtx_reader::read_escape): ...member function. (read_quoted_string): Convert to... (rtx_reader::read_quoted_string): ...member function. (read_braced_string): Convert to... (rtx_reader::read_braced_string): ...member function. (read_string): Convert to... (rtx_reader::read_string): ...member function. (read_skip_construct): Convert to... (rtx_reader::read_skip_construct): ...member function. (handle_constants): Convert to... (rtx_reader::handle_constants): ...member function. (traverse_md_constants): Convert to... (rtx_reader::traverse_md_constants): ...member function. (handle_enum): Convert to... (rtx_reader::handle_enum): ...member function. (lookup_enum_type): Convert to... (rtx_reader::lookup_enum_type): ...member function. (traverse_enum_types): Convert to... (rtx_reader::traverse_enum_types): ...member function. (rtx_reader::rtx_reader): Move initializations of various former global data from rtx_reader::read_md_files to here, as fields, along with the call to unlock_std_streams. (rtx_reader::~rtx_reader): Clean up m_base_dir, and clean up the new fields. (rtx_reader::read_md_files): Move initializations of various global data from here to the ctor. * read-md.h (read_name): Convert to... (rtx_reader::read_name): ...member function. (rtx_reader::read_escape): New method decl. (read_quoted_string): Convert to... (rtx_reader::read_quoted_string): ...member function. (rtx_reader::read_braced_string): New method decl. (read_string): Convert to... (rtx_reader::read_string): ...member function. (rtx_reader::read_skip_construct): New method decl. (rtx_reader::set_md_ptr_loc): New method decl. (rtx_reader::get_md_ptr_loc): New method decl. (copy_md_ptr_loc): Convert to... (rtx_reader::copy_md_ptr_loc): ...member function. (fprint_md_ptr_loc): Convert to... (rtx_reader::fprint_md_ptr_loc): ...member function. (print_md_ptr_loc): Convert to... (rtx_reader::print_md_ptr_loc): ...member function. (rtx_reader::lookup_enum_type): New method decl. (rtx_reader::traverse_enum_types): New method decl. (rtx_reader::handle_constants): New method decl. (traverse_md_constants): Convert to... (rtx_reader::traverse_md_constants): ...member function. (rtx_reader::handle_enum): New method decl. (rtx_reader::join_c_conditions): New method decl. (fprint_c_condition): Convert to... (rtx_reader::fprint_c_condition): ...member function. (print_c_condition): Convert to... (rtx_reader::print_c_condition): ...member function. (rtx_reader::apply_iterator_to_string): New method decl. (rtx_reader::copy_rtx_for_iterators): New method decl. (rtx_reader::read_conditions): New method decl. (rtx_reader::record_potential_iterator_use): New method decl. (rtx_reader::read_mapping): New method decl. (rtx_reader::read_rtx): New method decl. (rtx_reader::read_rtx_code): New method decl. (rtx_reader::read_rtx_operand): New method decl. (rtx_reader::read_nested_rtx): New method decl. (rtx_reader::read_rtx_variadic): New method decl. (rtx_reader::get_string_obstack): New method. (rtx_reader::get_md_constants): New method. (string_obstack): Convert global variable decl to... (rtx_reader::m_string_obstack): ...this new field. (rtx_reader::m_ptr_locs): New field. (rtx_reader::m_ptr_loc_obstack): New field. (rtx_reader::m_joined_conditions): New field. (rtx_reader::m_joined_conditions_obstack): New field. (rtx_reader::m_md_constants): New field. (rtx_reader::m_enum_types): New field. * read-rtl.c (apply_iterator_to_string): Convert to... (rtx_reader::apply_iterator_to_string): ...member function. (copy_rtx_for_iterators): Convert to... (rtx_reader::copy_rtx_for_iterators): ...member function. (add_condition_to_string): Use rtx_reader_ptr for calls join_c_conditions. (apply_iterators): Use rtx_reader_ptr for calls to join_c_conditions and copy_rtx_for_iterators. (read_conditions): Convert to... (rtx_reader::read_conditions): ...member function. (record_potential_iterator_use): Convert to... (rtx_reader::record_potential_iterator_use): ...member function. (read_mapping): Convert to... (rtx_reader::read_mapping): ...member function. (read_subst_mapping): Use rtx_reader_ptr for read_string call. (read_rtx): Convert to... (rtx_reader::read_rtx): ...member function. (read_rtx_code): Convert to... (rtx_reader::read_rtx_code): ...member function. (read_rtx_operand): Convert to... (rtx_reader::read_rtx_operand): ...member function. Update for move of string_obstack to a field. (read_nested_rtx): Convert to.. (rtx_reader::read_nested_rtx): ...member function. (read_rtx_variadic): Convert to.. (rtx_reader::read_rtx_variadic): ...member function. From-SVN: r241293
2016-10-18 02:19:17 +02:00
rtx_reader_ptr->print_md_ptr_loc (p->c_block);
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
if (p->c_block[0] == '{')
fputs (p->c_block, stdout);
else
printf ("{\n %s\n}", p->c_block);
fputs ("\n\n", stdout);
}
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
/* Given a predicate expression EXP, from form NAME, determine whether
it refers to the variable given as VAR. */
static bool
needs_variable (rtx exp, const char *var)
{
switch (GET_CODE (exp))
{
/* Ternary, binary, unary expressions need a variable if
any of their subexpressions do. */
case IF_THEN_ELSE:
if (needs_variable (XEXP (exp, 2), var))
return true;
re PR c/7652 (-Wswitch-break : Warn if a switch case falls through) PR c/7652 gcc/ * alias.c (find_base_value): Adjust fall through comment. * cfgexpand.c (expand_debug_expr): Likewise. * combine.c (find_split_point): Likewise. (expand_compound_operation): Likewise. Add FALLTHRU. (make_compound_operation): Adjust fall through comment. (canon_reg_for_combine): Add FALLTHRU. (force_to_mode): Adjust fall through comment. (simplify_shift_const_1): Likewise. (simplify_comparison): Likewise. * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Add FALLTHRU. * config/aarch64/predicates.md: Likewise. * config/i386/i386.c (function_arg_advance_32): Likewise. (ix86_gimplify_va_arg): Likewise. (print_reg): Likewise. (ix86_print_operand): Likewise. (ix86_build_const_vector): Likewise. (ix86_expand_branch): Likewise. (ix86_sched_init_global): Adjust fall through comment. (ix86_expand_args_builtin): Add FALLTHRU. (ix86_expand_builtin): Likewise. (ix86_expand_vector_init_one_var): Likewise. * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise. (rs6000_adjust_cost): Likewise. (insn_must_be_first_in_group): Likewise. * config/rs6000/rs6000.md: Likewise. Adjust fall through comment. * dbxout.c (dbxout_symbol): Adjust fall through comment. * df-scan.c (df_uses_record): Likewise. * dojump.c (do_jump): Add FALLTHRU. * dwarf2out.c (mem_loc_descriptor): Likewise. Adjust fall through comment. (resolve_args_picking_1): Adjust fall through comment. (loc_list_from_tree_1): Likewise. * expmed.c (make_tree): Likewise. * expr.c (expand_expr_real_2): Add FALLTHRU. (expand_expr_real_1): Likewise. Adjust fall through comment. * fold-const.c (const_binop): Adjust fall through comment. (fold_truth_not_expr): Likewise. (fold_cond_expr_with_comparison): Add FALLTHRU. (fold_binary_loc): Likewise. (contains_label_1): Adjust fall through comment. (multiple_of_p): Likewise. * gcov-tool.c (process_args): Add FALLTHRU. * genattrtab.c (check_attr_test): Likewise. (write_test_expr): Likewise. * genconfig.c (walk_insn_part): Likewise. * genpreds.c (validate_exp): Adjust fall through comment. (needs_variable): Likewise. * gensupport.c (get_alternatives_number): Add FALLTHRU. (subst_dup): Likewise. * gimple-pretty-print.c (dump_gimple_assign): Likewise. * gimplify.c (gimplify_addr_expr): Adjust fall through comment. (gimplify_scan_omp_clauses): Add FALLTHRU. (goa_stabilize_expr): Likewise. * graphite-isl-ast-to-gimple.c (substitute_ssa_name): Adjust fall through comment. * hsa-gen.c (get_address_from_value): Likewise. * ipa-icf.c (sem_function::hash_stmt): Likewise. * ira.c (ira_setup_alts): Add FALLTHRU. * lra-eliminations.c (lra_eliminate_regs_1): Adjust fall through comment. * lto-streamer-out.c (lto_output_tree_ref): Add FALLTHRU. * opts.c (common_handle_option): Likewise. * read-rtl.c (read_rtx_code): Likewise. * real.c (round_for_format): Likewise. * recog.c (asm_operand_ok): Likewise. * reginfo.c (reg_scan_mark_refs): Adjust fall through comment. * reload1.c (set_label_offsets): Likewise. (eliminate_regs_1): Likewise. (reload_reg_reaches_end_p): Likewise. * rtlanal.c (commutative_operand_precedence): Add FALLTHRU. (rtx_cost): Likewise. * sched-rgn.c (is_exception_free): Likewise. * simplify-rtx.c (simplify_rtx): Adjust fall through comment. * stor-layout.c (int_mode_for_mode): Likewise. * toplev.c (print_to_asm_out_file): Likewise. (print_to_stderr): Likewise. * tree-cfg.c (gimple_verify_flow_info): Likewise. * tree-chrec.c (chrec_fold_plus_1): Add FALLTHRU. (chrec_fold_multiply): Likewise. (evolution_function_is_invariant_rec_p): Likewise. (for_each_scev_op): Likewise. * tree-data-ref.c (siv_subscript_p): Likewise. (get_references_in_stmt): Likewise. * tree.c (find_placeholder_in_expr): Adjust fall through comment. (substitute_in_expr): Likewise. (type_cache_hasher::equal): Likewise. (walk_type_fields): Likewise. * var-tracking.c (adjust_mems): Add FALLTHRU. (set_dv_changed): Adjust fall through comment. * varasm.c (default_function_section): Add FALLTHRU. gcc/c-family/ * c-common.c (scalar_to_vector): Adjust fall through comment. * c-opts.c (c_common_handle_option): Likewise. * c-pragma.c (handle_pragma_pack): Add FALLTHRU. * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust fall through comment. * cilk.c (extract_free_variables): Add FALLTHRU. gcc/c/ * c-parser.c (c_parser_external_declaration): Add FALLTHRU. (c_parser_postfix_expression): Likewise. * c-typeck.c (build_unary_op): Adjust fall through comment. (c_mark_addressable): Likewise. gcc/cp/ * call.c (add_builtin_candidate): Add FALLTHRU. (build_integral_nontype_arg_conv): Adjust fall through comment. (build_new_op_1): Add FALLTHRU. (convert_like_real): Adjust fall through comment. * class.c (fixed_type_or_null): Likewise. * constexpr.c (cxx_eval_constant_expression): Likewise. (potential_constant_expression_1): Likewise. Add FALLTHRU. * cp-gimplify.c (cp_gimplify_expr): Adjust fall through comment. (cp_fold): Add FALLTHRU. * cvt.c (build_expr_type_conversion): Adjust fall through comment. * cxx-pretty-print.c (pp_cxx_unqualified_id): Add FALLTHRU. (pp_cxx_qualified_id): Likewise. (cxx_pretty_printer::constant): Adjust fall through comment. (cxx_pretty_printer::primary_expression): Add FALLTHRU. (pp_cxx_pm_expression): Adjust fall through comment. (cxx_pretty_printer::expression): Add FALLTHRU. (cxx_pretty_printer::declaration_specifiers): Reformat code. (pp_cxx_type_specifier_seq): Adjust fall through comment. (pp_cxx_ptr_operator): Likewise. Add FALLTHRU. * error.c (dump_type): Adjust fall through comment. (dump_decl): Likewise. * mangle.c (write_type): Likewise. * method.c (synthesized_method_walk): Add FALLTHRU. * name-lookup.c (arg_assoc_type): Likewise. * parser.c (cp_lexer_print_token): Adjust fall through comment. (cp_parser_primary_expression): Add FALLTHRU. (cp_parser_operator): Likewise. * pt.c (find_parameter_packs_r): Likewise. (tsubst_aggr_type): Adjust fall through comment. * semantics.c (finish_omp_clauses): Add FALLTHRU. * tree.c (lvalue_kind): Likewise. gcc/fortran/ * decl.c (match_attr_spec): Add FALLTHRU. * primary.c (match_arg_list_function): Likewise. * resolve.c (resolve_operator): Adjust fall through comment. (fixup_charlen): Add FALLTHRU. (resolve_allocate_expr): Adjust fall through comment. * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU. * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through comment. gcc/java/ * expr.c (java_truthvalue_conversion): Adjust fall through comment. * jcf-io.c (verify_constant_pool): Likewise. * typeck.c (promote_type): Likewise. gcc/objc/ * objc-encoding.c (encode_type): Add FALLTHRU. libcpp/ * lex.c (search_line_fast): Add FALLTHRU. (_cpp_lex_direct): Likewise. (cpp_token_val_index): Adjust fall through comment. * macro.c (parse_params): Add FALLTHRU. * pch.c (count_defs): Adjust fall through comment. (write_defs): Likewise. libiberty/ * cp-demangle.c (d_print_mod): Add FALLTHRU. From-SVN: r239410
2016-08-12 12:30:47 +02:00
/* fall through */
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
case AND:
case IOR:
if (needs_variable (XEXP (exp, 1), var))
return true;
re PR c/7652 (-Wswitch-break : Warn if a switch case falls through) PR c/7652 gcc/ * alias.c (find_base_value): Adjust fall through comment. * cfgexpand.c (expand_debug_expr): Likewise. * combine.c (find_split_point): Likewise. (expand_compound_operation): Likewise. Add FALLTHRU. (make_compound_operation): Adjust fall through comment. (canon_reg_for_combine): Add FALLTHRU. (force_to_mode): Adjust fall through comment. (simplify_shift_const_1): Likewise. (simplify_comparison): Likewise. * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Add FALLTHRU. * config/aarch64/predicates.md: Likewise. * config/i386/i386.c (function_arg_advance_32): Likewise. (ix86_gimplify_va_arg): Likewise. (print_reg): Likewise. (ix86_print_operand): Likewise. (ix86_build_const_vector): Likewise. (ix86_expand_branch): Likewise. (ix86_sched_init_global): Adjust fall through comment. (ix86_expand_args_builtin): Add FALLTHRU. (ix86_expand_builtin): Likewise. (ix86_expand_vector_init_one_var): Likewise. * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise. (rs6000_adjust_cost): Likewise. (insn_must_be_first_in_group): Likewise. * config/rs6000/rs6000.md: Likewise. Adjust fall through comment. * dbxout.c (dbxout_symbol): Adjust fall through comment. * df-scan.c (df_uses_record): Likewise. * dojump.c (do_jump): Add FALLTHRU. * dwarf2out.c (mem_loc_descriptor): Likewise. Adjust fall through comment. (resolve_args_picking_1): Adjust fall through comment. (loc_list_from_tree_1): Likewise. * expmed.c (make_tree): Likewise. * expr.c (expand_expr_real_2): Add FALLTHRU. (expand_expr_real_1): Likewise. Adjust fall through comment. * fold-const.c (const_binop): Adjust fall through comment. (fold_truth_not_expr): Likewise. (fold_cond_expr_with_comparison): Add FALLTHRU. (fold_binary_loc): Likewise. (contains_label_1): Adjust fall through comment. (multiple_of_p): Likewise. * gcov-tool.c (process_args): Add FALLTHRU. * genattrtab.c (check_attr_test): Likewise. (write_test_expr): Likewise. * genconfig.c (walk_insn_part): Likewise. * genpreds.c (validate_exp): Adjust fall through comment. (needs_variable): Likewise. * gensupport.c (get_alternatives_number): Add FALLTHRU. (subst_dup): Likewise. * gimple-pretty-print.c (dump_gimple_assign): Likewise. * gimplify.c (gimplify_addr_expr): Adjust fall through comment. (gimplify_scan_omp_clauses): Add FALLTHRU. (goa_stabilize_expr): Likewise. * graphite-isl-ast-to-gimple.c (substitute_ssa_name): Adjust fall through comment. * hsa-gen.c (get_address_from_value): Likewise. * ipa-icf.c (sem_function::hash_stmt): Likewise. * ira.c (ira_setup_alts): Add FALLTHRU. * lra-eliminations.c (lra_eliminate_regs_1): Adjust fall through comment. * lto-streamer-out.c (lto_output_tree_ref): Add FALLTHRU. * opts.c (common_handle_option): Likewise. * read-rtl.c (read_rtx_code): Likewise. * real.c (round_for_format): Likewise. * recog.c (asm_operand_ok): Likewise. * reginfo.c (reg_scan_mark_refs): Adjust fall through comment. * reload1.c (set_label_offsets): Likewise. (eliminate_regs_1): Likewise. (reload_reg_reaches_end_p): Likewise. * rtlanal.c (commutative_operand_precedence): Add FALLTHRU. (rtx_cost): Likewise. * sched-rgn.c (is_exception_free): Likewise. * simplify-rtx.c (simplify_rtx): Adjust fall through comment. * stor-layout.c (int_mode_for_mode): Likewise. * toplev.c (print_to_asm_out_file): Likewise. (print_to_stderr): Likewise. * tree-cfg.c (gimple_verify_flow_info): Likewise. * tree-chrec.c (chrec_fold_plus_1): Add FALLTHRU. (chrec_fold_multiply): Likewise. (evolution_function_is_invariant_rec_p): Likewise. (for_each_scev_op): Likewise. * tree-data-ref.c (siv_subscript_p): Likewise. (get_references_in_stmt): Likewise. * tree.c (find_placeholder_in_expr): Adjust fall through comment. (substitute_in_expr): Likewise. (type_cache_hasher::equal): Likewise. (walk_type_fields): Likewise. * var-tracking.c (adjust_mems): Add FALLTHRU. (set_dv_changed): Adjust fall through comment. * varasm.c (default_function_section): Add FALLTHRU. gcc/c-family/ * c-common.c (scalar_to_vector): Adjust fall through comment. * c-opts.c (c_common_handle_option): Likewise. * c-pragma.c (handle_pragma_pack): Add FALLTHRU. * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust fall through comment. * cilk.c (extract_free_variables): Add FALLTHRU. gcc/c/ * c-parser.c (c_parser_external_declaration): Add FALLTHRU. (c_parser_postfix_expression): Likewise. * c-typeck.c (build_unary_op): Adjust fall through comment. (c_mark_addressable): Likewise. gcc/cp/ * call.c (add_builtin_candidate): Add FALLTHRU. (build_integral_nontype_arg_conv): Adjust fall through comment. (build_new_op_1): Add FALLTHRU. (convert_like_real): Adjust fall through comment. * class.c (fixed_type_or_null): Likewise. * constexpr.c (cxx_eval_constant_expression): Likewise. (potential_constant_expression_1): Likewise. Add FALLTHRU. * cp-gimplify.c (cp_gimplify_expr): Adjust fall through comment. (cp_fold): Add FALLTHRU. * cvt.c (build_expr_type_conversion): Adjust fall through comment. * cxx-pretty-print.c (pp_cxx_unqualified_id): Add FALLTHRU. (pp_cxx_qualified_id): Likewise. (cxx_pretty_printer::constant): Adjust fall through comment. (cxx_pretty_printer::primary_expression): Add FALLTHRU. (pp_cxx_pm_expression): Adjust fall through comment. (cxx_pretty_printer::expression): Add FALLTHRU. (cxx_pretty_printer::declaration_specifiers): Reformat code. (pp_cxx_type_specifier_seq): Adjust fall through comment. (pp_cxx_ptr_operator): Likewise. Add FALLTHRU. * error.c (dump_type): Adjust fall through comment. (dump_decl): Likewise. * mangle.c (write_type): Likewise. * method.c (synthesized_method_walk): Add FALLTHRU. * name-lookup.c (arg_assoc_type): Likewise. * parser.c (cp_lexer_print_token): Adjust fall through comment. (cp_parser_primary_expression): Add FALLTHRU. (cp_parser_operator): Likewise. * pt.c (find_parameter_packs_r): Likewise. (tsubst_aggr_type): Adjust fall through comment. * semantics.c (finish_omp_clauses): Add FALLTHRU. * tree.c (lvalue_kind): Likewise. gcc/fortran/ * decl.c (match_attr_spec): Add FALLTHRU. * primary.c (match_arg_list_function): Likewise. * resolve.c (resolve_operator): Adjust fall through comment. (fixup_charlen): Add FALLTHRU. (resolve_allocate_expr): Adjust fall through comment. * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU. * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through comment. gcc/java/ * expr.c (java_truthvalue_conversion): Adjust fall through comment. * jcf-io.c (verify_constant_pool): Likewise. * typeck.c (promote_type): Likewise. gcc/objc/ * objc-encoding.c (encode_type): Add FALLTHRU. libcpp/ * lex.c (search_line_fast): Add FALLTHRU. (_cpp_lex_direct): Likewise. (cpp_token_val_index): Adjust fall through comment. * macro.c (parse_params): Add FALLTHRU. * pch.c (count_defs): Adjust fall through comment. (write_defs): Likewise. libiberty/ * cp-demangle.c (d_print_mod): Add FALLTHRU. From-SVN: r239410
2016-08-12 12:30:47 +02:00
/* fall through */
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
case NOT:
return needs_variable (XEXP (exp, 0), var);
/* MATCH_CODE uses "op", but nothing else. */
case MATCH_CODE:
return !strcmp (var, "op");
/* MATCH_OPERAND uses "op" and may use "mode". */
case MATCH_OPERAND:
if (!strcmp (var, "op"))
return true;
if (!strcmp (var, "mode") && GET_MODE (exp) == VOIDmode)
return true;
return false;
/* MATCH_TEST uses var if XSTR (exp, 0) =~ /\b${var}\b/o; */
case MATCH_TEST:
{
const char *p = XSTR (exp, 0);
const char *q = strstr (p, var);
if (!q)
return false;
if (q != p && (ISALNUM (q[-1]) || q[-1] == '_'))
return false;
q += strlen (var);
if (ISALNUM (q[0]) || q[0] == '_')
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return false;
}
return true;
default:
gcc_unreachable ();
}
}
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
/* Given an RTL expression EXP, find all subexpressions which we may
assume to perform mode tests. Normal MATCH_OPERAND does;
MATCH_CODE doesn't as such (although certain codes always have
VOIDmode); and we have to assume that MATCH_TEST does not.
These combine in almost-boolean fashion - the only exception is
that (not X) must be assumed not to perform a mode test, whether
or not X does.
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
The mark is the RTL /v flag, which is true for subexpressions which
do *not* perform mode tests.
*/
#define NO_MODE_TEST(EXP) RTX_FLAG (EXP, volatil)
static void
mark_mode_tests (rtx exp)
{
switch (GET_CODE (exp))
{
case MATCH_OPERAND:
{
struct pred_data *p = lookup_predicate (XSTR (exp, 1));
if (!p)
error ("reference to undefined predicate '%s'", XSTR (exp, 1));
else if (p->special || GET_MODE (exp) != VOIDmode)
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
NO_MODE_TEST (exp) = 1;
}
break;
case MATCH_CODE:
NO_MODE_TEST (exp) = 1;
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
break;
case MATCH_TEST:
case NOT:
NO_MODE_TEST (exp) = 1;
break;
case AND:
mark_mode_tests (XEXP (exp, 0));
mark_mode_tests (XEXP (exp, 1));
NO_MODE_TEST (exp) = (NO_MODE_TEST (XEXP (exp, 0))
&& NO_MODE_TEST (XEXP (exp, 1)));
break;
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
case IOR:
mark_mode_tests (XEXP (exp, 0));
mark_mode_tests (XEXP (exp, 1));
NO_MODE_TEST (exp) = (NO_MODE_TEST (XEXP (exp, 0))
|| NO_MODE_TEST (XEXP (exp, 1)));
break;
case IF_THEN_ELSE:
/* A ? B : C does a mode test if (one of A and B) does a mode
test, and C does too. */
mark_mode_tests (XEXP (exp, 0));
mark_mode_tests (XEXP (exp, 1));
mark_mode_tests (XEXP (exp, 2));
NO_MODE_TEST (exp) = ((NO_MODE_TEST (XEXP (exp, 0))
&& NO_MODE_TEST (XEXP (exp, 1)))
|| NO_MODE_TEST (XEXP (exp, 2)));
break;
default:
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
gcc_unreachable ();
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
}
}
/* Determine whether the expression EXP is a MATCH_CODE that should
be written as a switch statement. */
static bool
generate_switch_p (rtx exp)
{
return GET_CODE (exp) == MATCH_CODE
&& strchr (XSTR (exp, 0), ',');
}
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
/* Given a predicate, work out where in its RTL expression to add
tests for proper modes. Special predicates do not get any such
tests. We try to avoid adding tests when we don't have to; in
particular, other normal predicates can be counted on to do it for
us. */
static void
add_mode_tests (struct pred_data *p)
{
rtx match_test_exp, and_exp;
rtx *pos;
/* Don't touch special predicates. */
if (p->special)
return;
/* Check whether the predicate accepts const scalar ints (which always
have a stored mode of VOIDmode, but logically have a real mode)
and whether it matches anything besides const scalar ints. */
bool matches_const_scalar_int_p = false;
bool matches_other_p = false;
for (int i = 0; i < NUM_RTX_CODE; ++i)
if (p->codes[i])
switch (i)
{
case CONST_INT:
case CONST_WIDE_INT:
/* Special handling for (VOIDmode) LABEL_REFs. */
case LABEL_REF:
matches_const_scalar_int_p = true;
break;
case CONST_DOUBLE:
if (!TARGET_SUPPORTS_WIDE_INT)
matches_const_scalar_int_p = true;
matches_other_p = true;
break;
default:
matches_other_p = true;
break;
}
/* There's no need for a mode check if the predicate only accepts
constant integers. The code checks in the predicate are enough
to establish that the mode is VOIDmode.
Note that the predicate itself should check whether a scalar
integer is in range of the given mode. */
if (!matches_other_p)
return;
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
mark_mode_tests (p->exp);
/* If the whole expression already tests the mode, we're done. */
if (!NO_MODE_TEST (p->exp))
return;
match_test_exp = rtx_alloc (MATCH_TEST);
if (matches_const_scalar_int_p)
XSTR (match_test_exp, 0) = ("mode == VOIDmode || GET_MODE (op) == mode"
" || GET_MODE (op) == VOIDmode");
else
XSTR (match_test_exp, 0) = "mode == VOIDmode || GET_MODE (op) == mode";
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
and_exp = rtx_alloc (AND);
XEXP (and_exp, 1) = match_test_exp;
/* It is always correct to rewrite p->exp as
(and (...) (match_test "mode == VOIDmode || GET_MODE (op) == mode"))
but there are a couple forms where we can do better. If the
top-level pattern is an IOR, and one of the two branches does test
the mode, we can wrap just the branch that doesn't. Likewise, if
we have an IF_THEN_ELSE, and one side of it tests the mode, we can
wrap just the side that doesn't. And, of course, we can repeat this
descent as many times as it works. */
pos = &p->exp;
for (;;)
{
rtx subexp = *pos;
Makefile.in (gengtype): Use $(BUILD_ERRORS). * Makefile.in (gengtype): Use $(BUILD_ERRORS). (gengtype.o): Depend on errors.h. * genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable. (attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr, attr_alt_subset_p, attr_alt_subset_of_compl_p, attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn, write_test_expr, write_attr_value, write_eligible_delay, make_internal_attr, make_numeric_value): Likewise. * genautomata.c (regexp_name, get_str_vect, gen_presence_absence_set, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps, process_regexp_cycles, reserv_sets_cmp, set_unit_reserv, test_unit_reserv, it_is_empty_reserv_sets, reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or, reserv_sets_and, output_cycle_reservs, get_free_state, intersected_state_reservs_p, states_union, remove_arc, copy_insn_regexp, transform_1, transform_2, transform_3, regexp_transform_func, store_alt_unit_usage, check_regexp_units_distribution, process_seq_for_forming_states, process_alts_for_forming_states, make_automaton, form_arcs_marked_by_insn, create_composed_state, set_out_arc_insns_equiv_num, partition_equiv_class, process_insn_equiv_class, set_insn_equiv_classes, units_to_automata_heuristic_distr, form_regexp, longest_path_length, output_dfa_max_issue_rate, add_vect, out_state_arcs_num, add_vect_el, output_trans_table, output_state_alts_table, output_dead_lock_vect, output_max_insn_queue_index_def, output_min_insn_conflict_delay_func, output_internal_insn_latency_func, output_print_reservation_func, output_cpu_unit_reservation_p, output_state_arcs, make_insn_alts_attr, make_internal_dfa_insn_code_attr, make_default_insn_latency_attr, form_important_insn_automata_lists): Likewise. * genemit.c (gen_exp, output_add_clobbers, output_added_clobbers_hard_reg_p): Likewise. * genextract.c (print_path, main): Likewise. * genflags.c (gen_macro): Likewise. * gengenrtl.c: Include errors.h (type_from_format, accessor_from_format): Likewise. * gengtype.c (get_file_basename, output_mangled_typename, walk_type, write_types_process_field, write_types_local_process_field): Likewise. * genmodes.c (complete_mode): Likewise. * genopinit.c (gen_insn): Likewise. * genoutput.c (output_insn_data, check_constraint_len, constraint_len): Likewise. * genpreds.c (add_mode_tests):Likewise. * gen-protos.c (add_hash): Likewise. * genrecog.c (find_operand, find_matching_operand, validate_pattern, add_to_sequence, maybe_both_true, nodes_identical_1, merge_trees, write_switch, write_cond, write_action, is_unconditional, make_insn_sequence, debug_decision_2): Likewise. * gensupport.c (is_predicable, collect_insn_data, alter_predicate_for_insn, maybe_eval_c_test): Likewise. From-SVN: r87236
2004-09-09 15:22:38 +02:00
switch (GET_CODE (subexp))
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
{
case AND:
/* The switch code generation in write_predicate_stmts prefers
rtx code tests to be at the top of the expression tree. So
push this AND down into the second operand of an existing
AND expression. */
if (generate_switch_p (XEXP (subexp, 0)))
pos = &XEXP (subexp, 1);
goto break_loop;
Makefile.in (gengtype): Use $(BUILD_ERRORS). * Makefile.in (gengtype): Use $(BUILD_ERRORS). (gengtype.o): Depend on errors.h. * genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable. (attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr, attr_alt_subset_p, attr_alt_subset_of_compl_p, attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn, write_test_expr, write_attr_value, write_eligible_delay, make_internal_attr, make_numeric_value): Likewise. * genautomata.c (regexp_name, get_str_vect, gen_presence_absence_set, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps, process_regexp_cycles, reserv_sets_cmp, set_unit_reserv, test_unit_reserv, it_is_empty_reserv_sets, reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or, reserv_sets_and, output_cycle_reservs, get_free_state, intersected_state_reservs_p, states_union, remove_arc, copy_insn_regexp, transform_1, transform_2, transform_3, regexp_transform_func, store_alt_unit_usage, check_regexp_units_distribution, process_seq_for_forming_states, process_alts_for_forming_states, make_automaton, form_arcs_marked_by_insn, create_composed_state, set_out_arc_insns_equiv_num, partition_equiv_class, process_insn_equiv_class, set_insn_equiv_classes, units_to_automata_heuristic_distr, form_regexp, longest_path_length, output_dfa_max_issue_rate, add_vect, out_state_arcs_num, add_vect_el, output_trans_table, output_state_alts_table, output_dead_lock_vect, output_max_insn_queue_index_def, output_min_insn_conflict_delay_func, output_internal_insn_latency_func, output_print_reservation_func, output_cpu_unit_reservation_p, output_state_arcs, make_insn_alts_attr, make_internal_dfa_insn_code_attr, make_default_insn_latency_attr, form_important_insn_automata_lists): Likewise. * genemit.c (gen_exp, output_add_clobbers, output_added_clobbers_hard_reg_p): Likewise. * genextract.c (print_path, main): Likewise. * genflags.c (gen_macro): Likewise. * gengenrtl.c: Include errors.h (type_from_format, accessor_from_format): Likewise. * gengtype.c (get_file_basename, output_mangled_typename, walk_type, write_types_process_field, write_types_local_process_field): Likewise. * genmodes.c (complete_mode): Likewise. * genopinit.c (gen_insn): Likewise. * genoutput.c (output_insn_data, check_constraint_len, constraint_len): Likewise. * genpreds.c (add_mode_tests):Likewise. * gen-protos.c (add_hash): Likewise. * genrecog.c (find_operand, find_matching_operand, validate_pattern, add_to_sequence, maybe_both_true, nodes_identical_1, merge_trees, write_switch, write_cond, write_action, is_unconditional, make_insn_sequence, debug_decision_2): Likewise. * gensupport.c (is_predicable, collect_insn_data, alter_predicate_for_insn, maybe_eval_c_test): Likewise. From-SVN: r87236
2004-09-09 15:22:38 +02:00
case IOR:
{
int test0 = NO_MODE_TEST (XEXP (subexp, 0));
int test1 = NO_MODE_TEST (XEXP (subexp, 1));
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
Makefile.in (gengtype): Use $(BUILD_ERRORS). * Makefile.in (gengtype): Use $(BUILD_ERRORS). (gengtype.o): Depend on errors.h. * genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable. (attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr, attr_alt_subset_p, attr_alt_subset_of_compl_p, attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn, write_test_expr, write_attr_value, write_eligible_delay, make_internal_attr, make_numeric_value): Likewise. * genautomata.c (regexp_name, get_str_vect, gen_presence_absence_set, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps, process_regexp_cycles, reserv_sets_cmp, set_unit_reserv, test_unit_reserv, it_is_empty_reserv_sets, reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or, reserv_sets_and, output_cycle_reservs, get_free_state, intersected_state_reservs_p, states_union, remove_arc, copy_insn_regexp, transform_1, transform_2, transform_3, regexp_transform_func, store_alt_unit_usage, check_regexp_units_distribution, process_seq_for_forming_states, process_alts_for_forming_states, make_automaton, form_arcs_marked_by_insn, create_composed_state, set_out_arc_insns_equiv_num, partition_equiv_class, process_insn_equiv_class, set_insn_equiv_classes, units_to_automata_heuristic_distr, form_regexp, longest_path_length, output_dfa_max_issue_rate, add_vect, out_state_arcs_num, add_vect_el, output_trans_table, output_state_alts_table, output_dead_lock_vect, output_max_insn_queue_index_def, output_min_insn_conflict_delay_func, output_internal_insn_latency_func, output_print_reservation_func, output_cpu_unit_reservation_p, output_state_arcs, make_insn_alts_attr, make_internal_dfa_insn_code_attr, make_default_insn_latency_attr, form_important_insn_automata_lists): Likewise. * genemit.c (gen_exp, output_add_clobbers, output_added_clobbers_hard_reg_p): Likewise. * genextract.c (print_path, main): Likewise. * genflags.c (gen_macro): Likewise. * gengenrtl.c: Include errors.h (type_from_format, accessor_from_format): Likewise. * gengtype.c (get_file_basename, output_mangled_typename, walk_type, write_types_process_field, write_types_local_process_field): Likewise. * genmodes.c (complete_mode): Likewise. * genopinit.c (gen_insn): Likewise. * genoutput.c (output_insn_data, check_constraint_len, constraint_len): Likewise. * genpreds.c (add_mode_tests):Likewise. * gen-protos.c (add_hash): Likewise. * genrecog.c (find_operand, find_matching_operand, validate_pattern, add_to_sequence, maybe_both_true, nodes_identical_1, merge_trees, write_switch, write_cond, write_action, is_unconditional, make_insn_sequence, debug_decision_2): Likewise. * gensupport.c (is_predicable, collect_insn_data, alter_predicate_for_insn, maybe_eval_c_test): Likewise. From-SVN: r87236
2004-09-09 15:22:38 +02:00
gcc_assert (test0 || test1);
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
Makefile.in (gengtype): Use $(BUILD_ERRORS). * Makefile.in (gengtype): Use $(BUILD_ERRORS). (gengtype.o): Depend on errors.h. * genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable. (attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr, attr_alt_subset_p, attr_alt_subset_of_compl_p, attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn, write_test_expr, write_attr_value, write_eligible_delay, make_internal_attr, make_numeric_value): Likewise. * genautomata.c (regexp_name, get_str_vect, gen_presence_absence_set, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps, process_regexp_cycles, reserv_sets_cmp, set_unit_reserv, test_unit_reserv, it_is_empty_reserv_sets, reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or, reserv_sets_and, output_cycle_reservs, get_free_state, intersected_state_reservs_p, states_union, remove_arc, copy_insn_regexp, transform_1, transform_2, transform_3, regexp_transform_func, store_alt_unit_usage, check_regexp_units_distribution, process_seq_for_forming_states, process_alts_for_forming_states, make_automaton, form_arcs_marked_by_insn, create_composed_state, set_out_arc_insns_equiv_num, partition_equiv_class, process_insn_equiv_class, set_insn_equiv_classes, units_to_automata_heuristic_distr, form_regexp, longest_path_length, output_dfa_max_issue_rate, add_vect, out_state_arcs_num, add_vect_el, output_trans_table, output_state_alts_table, output_dead_lock_vect, output_max_insn_queue_index_def, output_min_insn_conflict_delay_func, output_internal_insn_latency_func, output_print_reservation_func, output_cpu_unit_reservation_p, output_state_arcs, make_insn_alts_attr, make_internal_dfa_insn_code_attr, make_default_insn_latency_attr, form_important_insn_automata_lists): Likewise. * genemit.c (gen_exp, output_add_clobbers, output_added_clobbers_hard_reg_p): Likewise. * genextract.c (print_path, main): Likewise. * genflags.c (gen_macro): Likewise. * gengenrtl.c: Include errors.h (type_from_format, accessor_from_format): Likewise. * gengtype.c (get_file_basename, output_mangled_typename, walk_type, write_types_process_field, write_types_local_process_field): Likewise. * genmodes.c (complete_mode): Likewise. * genopinit.c (gen_insn): Likewise. * genoutput.c (output_insn_data, check_constraint_len, constraint_len): Likewise. * genpreds.c (add_mode_tests):Likewise. * gen-protos.c (add_hash): Likewise. * genrecog.c (find_operand, find_matching_operand, validate_pattern, add_to_sequence, maybe_both_true, nodes_identical_1, merge_trees, write_switch, write_cond, write_action, is_unconditional, make_insn_sequence, debug_decision_2): Likewise. * gensupport.c (is_predicable, collect_insn_data, alter_predicate_for_insn, maybe_eval_c_test): Likewise. From-SVN: r87236
2004-09-09 15:22:38 +02:00
if (test0 && test1)
goto break_loop;
pos = test0 ? &XEXP (subexp, 0) : &XEXP (subexp, 1);
}
break;
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
Makefile.in (gengtype): Use $(BUILD_ERRORS). * Makefile.in (gengtype): Use $(BUILD_ERRORS). (gengtype.o): Depend on errors.h. * genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable. (attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr, attr_alt_subset_p, attr_alt_subset_of_compl_p, attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn, write_test_expr, write_attr_value, write_eligible_delay, make_internal_attr, make_numeric_value): Likewise. * genautomata.c (regexp_name, get_str_vect, gen_presence_absence_set, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps, process_regexp_cycles, reserv_sets_cmp, set_unit_reserv, test_unit_reserv, it_is_empty_reserv_sets, reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or, reserv_sets_and, output_cycle_reservs, get_free_state, intersected_state_reservs_p, states_union, remove_arc, copy_insn_regexp, transform_1, transform_2, transform_3, regexp_transform_func, store_alt_unit_usage, check_regexp_units_distribution, process_seq_for_forming_states, process_alts_for_forming_states, make_automaton, form_arcs_marked_by_insn, create_composed_state, set_out_arc_insns_equiv_num, partition_equiv_class, process_insn_equiv_class, set_insn_equiv_classes, units_to_automata_heuristic_distr, form_regexp, longest_path_length, output_dfa_max_issue_rate, add_vect, out_state_arcs_num, add_vect_el, output_trans_table, output_state_alts_table, output_dead_lock_vect, output_max_insn_queue_index_def, output_min_insn_conflict_delay_func, output_internal_insn_latency_func, output_print_reservation_func, output_cpu_unit_reservation_p, output_state_arcs, make_insn_alts_attr, make_internal_dfa_insn_code_attr, make_default_insn_latency_attr, form_important_insn_automata_lists): Likewise. * genemit.c (gen_exp, output_add_clobbers, output_added_clobbers_hard_reg_p): Likewise. * genextract.c (print_path, main): Likewise. * genflags.c (gen_macro): Likewise. * gengenrtl.c: Include errors.h (type_from_format, accessor_from_format): Likewise. * gengtype.c (get_file_basename, output_mangled_typename, walk_type, write_types_process_field, write_types_local_process_field): Likewise. * genmodes.c (complete_mode): Likewise. * genopinit.c (gen_insn): Likewise. * genoutput.c (output_insn_data, check_constraint_len, constraint_len): Likewise. * genpreds.c (add_mode_tests):Likewise. * gen-protos.c (add_hash): Likewise. * genrecog.c (find_operand, find_matching_operand, validate_pattern, add_to_sequence, maybe_both_true, nodes_identical_1, merge_trees, write_switch, write_cond, write_action, is_unconditional, make_insn_sequence, debug_decision_2): Likewise. * gensupport.c (is_predicable, collect_insn_data, alter_predicate_for_insn, maybe_eval_c_test): Likewise. From-SVN: r87236
2004-09-09 15:22:38 +02:00
case IF_THEN_ELSE:
{
int test0 = NO_MODE_TEST (XEXP (subexp, 0));
int test1 = NO_MODE_TEST (XEXP (subexp, 1));
int test2 = NO_MODE_TEST (XEXP (subexp, 2));
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
Makefile.in (gengtype): Use $(BUILD_ERRORS). * Makefile.in (gengtype): Use $(BUILD_ERRORS). (gengtype.o): Depend on errors.h. * genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable. (attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr, attr_alt_subset_p, attr_alt_subset_of_compl_p, attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn, write_test_expr, write_attr_value, write_eligible_delay, make_internal_attr, make_numeric_value): Likewise. * genautomata.c (regexp_name, get_str_vect, gen_presence_absence_set, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps, process_regexp_cycles, reserv_sets_cmp, set_unit_reserv, test_unit_reserv, it_is_empty_reserv_sets, reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or, reserv_sets_and, output_cycle_reservs, get_free_state, intersected_state_reservs_p, states_union, remove_arc, copy_insn_regexp, transform_1, transform_2, transform_3, regexp_transform_func, store_alt_unit_usage, check_regexp_units_distribution, process_seq_for_forming_states, process_alts_for_forming_states, make_automaton, form_arcs_marked_by_insn, create_composed_state, set_out_arc_insns_equiv_num, partition_equiv_class, process_insn_equiv_class, set_insn_equiv_classes, units_to_automata_heuristic_distr, form_regexp, longest_path_length, output_dfa_max_issue_rate, add_vect, out_state_arcs_num, add_vect_el, output_trans_table, output_state_alts_table, output_dead_lock_vect, output_max_insn_queue_index_def, output_min_insn_conflict_delay_func, output_internal_insn_latency_func, output_print_reservation_func, output_cpu_unit_reservation_p, output_state_arcs, make_insn_alts_attr, make_internal_dfa_insn_code_attr, make_default_insn_latency_attr, form_important_insn_automata_lists): Likewise. * genemit.c (gen_exp, output_add_clobbers, output_added_clobbers_hard_reg_p): Likewise. * genextract.c (print_path, main): Likewise. * genflags.c (gen_macro): Likewise. * gengenrtl.c: Include errors.h (type_from_format, accessor_from_format): Likewise. * gengtype.c (get_file_basename, output_mangled_typename, walk_type, write_types_process_field, write_types_local_process_field): Likewise. * genmodes.c (complete_mode): Likewise. * genopinit.c (gen_insn): Likewise. * genoutput.c (output_insn_data, check_constraint_len, constraint_len): Likewise. * genpreds.c (add_mode_tests):Likewise. * gen-protos.c (add_hash): Likewise. * genrecog.c (find_operand, find_matching_operand, validate_pattern, add_to_sequence, maybe_both_true, nodes_identical_1, merge_trees, write_switch, write_cond, write_action, is_unconditional, make_insn_sequence, debug_decision_2): Likewise. * gensupport.c (is_predicable, collect_insn_data, alter_predicate_for_insn, maybe_eval_c_test): Likewise. From-SVN: r87236
2004-09-09 15:22:38 +02:00
gcc_assert ((test0 && test1) || test2);
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
Makefile.in (gengtype): Use $(BUILD_ERRORS). * Makefile.in (gengtype): Use $(BUILD_ERRORS). (gengtype.o): Depend on errors.h. * genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable. (attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr, attr_alt_subset_p, attr_alt_subset_of_compl_p, attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn, write_test_expr, write_attr_value, write_eligible_delay, make_internal_attr, make_numeric_value): Likewise. * genautomata.c (regexp_name, get_str_vect, gen_presence_absence_set, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps, process_regexp_cycles, reserv_sets_cmp, set_unit_reserv, test_unit_reserv, it_is_empty_reserv_sets, reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or, reserv_sets_and, output_cycle_reservs, get_free_state, intersected_state_reservs_p, states_union, remove_arc, copy_insn_regexp, transform_1, transform_2, transform_3, regexp_transform_func, store_alt_unit_usage, check_regexp_units_distribution, process_seq_for_forming_states, process_alts_for_forming_states, make_automaton, form_arcs_marked_by_insn, create_composed_state, set_out_arc_insns_equiv_num, partition_equiv_class, process_insn_equiv_class, set_insn_equiv_classes, units_to_automata_heuristic_distr, form_regexp, longest_path_length, output_dfa_max_issue_rate, add_vect, out_state_arcs_num, add_vect_el, output_trans_table, output_state_alts_table, output_dead_lock_vect, output_max_insn_queue_index_def, output_min_insn_conflict_delay_func, output_internal_insn_latency_func, output_print_reservation_func, output_cpu_unit_reservation_p, output_state_arcs, make_insn_alts_attr, make_internal_dfa_insn_code_attr, make_default_insn_latency_attr, form_important_insn_automata_lists): Likewise. * genemit.c (gen_exp, output_add_clobbers, output_added_clobbers_hard_reg_p): Likewise. * genextract.c (print_path, main): Likewise. * genflags.c (gen_macro): Likewise. * gengenrtl.c: Include errors.h (type_from_format, accessor_from_format): Likewise. * gengtype.c (get_file_basename, output_mangled_typename, walk_type, write_types_process_field, write_types_local_process_field): Likewise. * genmodes.c (complete_mode): Likewise. * genopinit.c (gen_insn): Likewise. * genoutput.c (output_insn_data, check_constraint_len, constraint_len): Likewise. * genpreds.c (add_mode_tests):Likewise. * gen-protos.c (add_hash): Likewise. * genrecog.c (find_operand, find_matching_operand, validate_pattern, add_to_sequence, maybe_both_true, nodes_identical_1, merge_trees, write_switch, write_cond, write_action, is_unconditional, make_insn_sequence, debug_decision_2): Likewise. * gensupport.c (is_predicable, collect_insn_data, alter_predicate_for_insn, maybe_eval_c_test): Likewise. From-SVN: r87236
2004-09-09 15:22:38 +02:00
if (test0 && test1 && test2)
goto break_loop;
if (test0 && test1)
/* Must put it on the dependent clause, not the
controlling expression, or we change the meaning of
the test. */
Makefile.in (gengtype): Use $(BUILD_ERRORS). * Makefile.in (gengtype): Use $(BUILD_ERRORS). (gengtype.o): Depend on errors.h. * genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable. (attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr, attr_alt_subset_p, attr_alt_subset_of_compl_p, attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn, write_test_expr, write_attr_value, write_eligible_delay, make_internal_attr, make_numeric_value): Likewise. * genautomata.c (regexp_name, get_str_vect, gen_presence_absence_set, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps, process_regexp_cycles, reserv_sets_cmp, set_unit_reserv, test_unit_reserv, it_is_empty_reserv_sets, reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or, reserv_sets_and, output_cycle_reservs, get_free_state, intersected_state_reservs_p, states_union, remove_arc, copy_insn_regexp, transform_1, transform_2, transform_3, regexp_transform_func, store_alt_unit_usage, check_regexp_units_distribution, process_seq_for_forming_states, process_alts_for_forming_states, make_automaton, form_arcs_marked_by_insn, create_composed_state, set_out_arc_insns_equiv_num, partition_equiv_class, process_insn_equiv_class, set_insn_equiv_classes, units_to_automata_heuristic_distr, form_regexp, longest_path_length, output_dfa_max_issue_rate, add_vect, out_state_arcs_num, add_vect_el, output_trans_table, output_state_alts_table, output_dead_lock_vect, output_max_insn_queue_index_def, output_min_insn_conflict_delay_func, output_internal_insn_latency_func, output_print_reservation_func, output_cpu_unit_reservation_p, output_state_arcs, make_insn_alts_attr, make_internal_dfa_insn_code_attr, make_default_insn_latency_attr, form_important_insn_automata_lists): Likewise. * genemit.c (gen_exp, output_add_clobbers, output_added_clobbers_hard_reg_p): Likewise. * genextract.c (print_path, main): Likewise. * genflags.c (gen_macro): Likewise. * gengenrtl.c: Include errors.h (type_from_format, accessor_from_format): Likewise. * gengtype.c (get_file_basename, output_mangled_typename, walk_type, write_types_process_field, write_types_local_process_field): Likewise. * genmodes.c (complete_mode): Likewise. * genopinit.c (gen_insn): Likewise. * genoutput.c (output_insn_data, check_constraint_len, constraint_len): Likewise. * genpreds.c (add_mode_tests):Likewise. * gen-protos.c (add_hash): Likewise. * genrecog.c (find_operand, find_matching_operand, validate_pattern, add_to_sequence, maybe_both_true, nodes_identical_1, merge_trees, write_switch, write_cond, write_action, is_unconditional, make_insn_sequence, debug_decision_2): Likewise. * gensupport.c (is_predicable, collect_insn_data, alter_predicate_for_insn, maybe_eval_c_test): Likewise. From-SVN: r87236
2004-09-09 15:22:38 +02:00
pos = &XEXP (subexp, 1);
else
pos = &XEXP (subexp, 2);
}
break;
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
Makefile.in (gengtype): Use $(BUILD_ERRORS). * Makefile.in (gengtype): Use $(BUILD_ERRORS). (gengtype.o): Depend on errors.h. * genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable. (attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr, attr_alt_subset_p, attr_alt_subset_of_compl_p, attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn, write_test_expr, write_attr_value, write_eligible_delay, make_internal_attr, make_numeric_value): Likewise. * genautomata.c (regexp_name, get_str_vect, gen_presence_absence_set, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps, process_regexp_cycles, reserv_sets_cmp, set_unit_reserv, test_unit_reserv, it_is_empty_reserv_sets, reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or, reserv_sets_and, output_cycle_reservs, get_free_state, intersected_state_reservs_p, states_union, remove_arc, copy_insn_regexp, transform_1, transform_2, transform_3, regexp_transform_func, store_alt_unit_usage, check_regexp_units_distribution, process_seq_for_forming_states, process_alts_for_forming_states, make_automaton, form_arcs_marked_by_insn, create_composed_state, set_out_arc_insns_equiv_num, partition_equiv_class, process_insn_equiv_class, set_insn_equiv_classes, units_to_automata_heuristic_distr, form_regexp, longest_path_length, output_dfa_max_issue_rate, add_vect, out_state_arcs_num, add_vect_el, output_trans_table, output_state_alts_table, output_dead_lock_vect, output_max_insn_queue_index_def, output_min_insn_conflict_delay_func, output_internal_insn_latency_func, output_print_reservation_func, output_cpu_unit_reservation_p, output_state_arcs, make_insn_alts_attr, make_internal_dfa_insn_code_attr, make_default_insn_latency_attr, form_important_insn_automata_lists): Likewise. * genemit.c (gen_exp, output_add_clobbers, output_added_clobbers_hard_reg_p): Likewise. * genextract.c (print_path, main): Likewise. * genflags.c (gen_macro): Likewise. * gengenrtl.c: Include errors.h (type_from_format, accessor_from_format): Likewise. * gengtype.c (get_file_basename, output_mangled_typename, walk_type, write_types_process_field, write_types_local_process_field): Likewise. * genmodes.c (complete_mode): Likewise. * genopinit.c (gen_insn): Likewise. * genoutput.c (output_insn_data, check_constraint_len, constraint_len): Likewise. * genpreds.c (add_mode_tests):Likewise. * gen-protos.c (add_hash): Likewise. * genrecog.c (find_operand, find_matching_operand, validate_pattern, add_to_sequence, maybe_both_true, nodes_identical_1, merge_trees, write_switch, write_cond, write_action, is_unconditional, make_insn_sequence, debug_decision_2): Likewise. * gensupport.c (is_predicable, collect_insn_data, alter_predicate_for_insn, maybe_eval_c_test): Likewise. From-SVN: r87236
2004-09-09 15:22:38 +02:00
default:
goto break_loop;
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
}
}
Makefile.in (gengtype): Use $(BUILD_ERRORS). * Makefile.in (gengtype): Use $(BUILD_ERRORS). (gengtype.o): Depend on errors.h. * genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable. (attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr, attr_alt_subset_p, attr_alt_subset_of_compl_p, attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn, write_test_expr, write_attr_value, write_eligible_delay, make_internal_attr, make_numeric_value): Likewise. * genautomata.c (regexp_name, get_str_vect, gen_presence_absence_set, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps, process_regexp_cycles, reserv_sets_cmp, set_unit_reserv, test_unit_reserv, it_is_empty_reserv_sets, reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or, reserv_sets_and, output_cycle_reservs, get_free_state, intersected_state_reservs_p, states_union, remove_arc, copy_insn_regexp, transform_1, transform_2, transform_3, regexp_transform_func, store_alt_unit_usage, check_regexp_units_distribution, process_seq_for_forming_states, process_alts_for_forming_states, make_automaton, form_arcs_marked_by_insn, create_composed_state, set_out_arc_insns_equiv_num, partition_equiv_class, process_insn_equiv_class, set_insn_equiv_classes, units_to_automata_heuristic_distr, form_regexp, longest_path_length, output_dfa_max_issue_rate, add_vect, out_state_arcs_num, add_vect_el, output_trans_table, output_state_alts_table, output_dead_lock_vect, output_max_insn_queue_index_def, output_min_insn_conflict_delay_func, output_internal_insn_latency_func, output_print_reservation_func, output_cpu_unit_reservation_p, output_state_arcs, make_insn_alts_attr, make_internal_dfa_insn_code_attr, make_default_insn_latency_attr, form_important_insn_automata_lists): Likewise. * genemit.c (gen_exp, output_add_clobbers, output_added_clobbers_hard_reg_p): Likewise. * genextract.c (print_path, main): Likewise. * genflags.c (gen_macro): Likewise. * gengenrtl.c: Include errors.h (type_from_format, accessor_from_format): Likewise. * gengtype.c (get_file_basename, output_mangled_typename, walk_type, write_types_process_field, write_types_local_process_field): Likewise. * genmodes.c (complete_mode): Likewise. * genopinit.c (gen_insn): Likewise. * genoutput.c (output_insn_data, check_constraint_len, constraint_len): Likewise. * genpreds.c (add_mode_tests):Likewise. * gen-protos.c (add_hash): Likewise. * genrecog.c (find_operand, find_matching_operand, validate_pattern, add_to_sequence, maybe_both_true, nodes_identical_1, merge_trees, write_switch, write_cond, write_action, is_unconditional, make_insn_sequence, debug_decision_2): Likewise. * gensupport.c (is_predicable, collect_insn_data, alter_predicate_for_insn, maybe_eval_c_test): Likewise. From-SVN: r87236
2004-09-09 15:22:38 +02:00
break_loop:
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
XEXP (and_exp, 0) = *pos;
*pos = and_exp;
}
/* PATH is a string describing a path from the root of an RTL
expression to an inner subexpression to be tested. Output
code which computes the subexpression from the variable
holding the root of the expression. */
static void
write_extract_subexp (const char *path)
{
int len = strlen (path);
int i;
/* We first write out the operations (XEXP or XVECEXP) in reverse
order, then write "op", then the indices in forward order. */
for (i = len - 1; i >= 0; i--)
{
if (ISLOWER (path[i]))
fputs ("XVECEXP (", stdout);
else if (ISDIGIT (path[i]))
fputs ("XEXP (", stdout);
else
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
gcc_unreachable ();
}
fputs ("op", stdout);
for (i = 0; i < len; i++)
{
if (ISLOWER (path[i]))
printf (", 0, %d)", path[i] - 'a');
else if (ISDIGIT (path[i]))
printf (", %d)", path[i] - '0');
else
gcc_unreachable ();
}
}
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
/* CODES is a list of RTX codes. Write out an expression which
determines whether the operand has one of those codes. */
static void
write_match_code (const char *path, const char *codes)
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
{
const char *code;
while ((code = scan_comma_elt (&codes)) != 0)
{
fputs ("GET_CODE (", stdout);
write_extract_subexp (path);
fputs (") == ", stdout);
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
while (code < codes)
{
putchar (TOUPPER (*code));
code++;
}
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
if (*codes == ',')
fputs (" || ", stdout);
}
}
/* EXP is an RTL (sub)expression for a predicate. Recursively
descend the expression and write out an equivalent C expression. */
static void
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
write_predicate_expr (rtx exp)
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
{
switch (GET_CODE (exp))
{
case AND:
putchar ('(');
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
write_predicate_expr (XEXP (exp, 0));
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
fputs (") && (", stdout);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
write_predicate_expr (XEXP (exp, 1));
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
putchar (')');
break;
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
case IOR:
putchar ('(');
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
write_predicate_expr (XEXP (exp, 0));
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
fputs (") || (", stdout);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
write_predicate_expr (XEXP (exp, 1));
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
putchar (')');
break;
case NOT:
fputs ("!(", stdout);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
write_predicate_expr (XEXP (exp, 0));
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
putchar (')');
break;
case IF_THEN_ELSE:
putchar ('(');
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
write_predicate_expr (XEXP (exp, 0));
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
fputs (") ? (", stdout);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
write_predicate_expr (XEXP (exp, 1));
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
fputs (") : (", stdout);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
write_predicate_expr (XEXP (exp, 2));
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
putchar (')');
break;
case MATCH_OPERAND:
if (GET_MODE (exp) == VOIDmode)
printf ("%s (op, mode)", XSTR (exp, 1));
else
printf ("%s (op, %smode)", XSTR (exp, 1), mode_name[GET_MODE (exp)]);
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
break;
case MATCH_CODE:
write_match_code (XSTR (exp, 1), XSTR (exp, 0));
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
break;
case MATCH_TEST:
read-md.c: Move various state to within class rtx_reader gcc/ChangeLog: * genattrtab.c (attr_string): Use rtx_reader_ptr for call to copy_md_ptr_loc. (gen_attr): Use rtx_reader_ptr for lookup_enum_type call. (write_test_expr): Use rtx_reader_ptr for calls to fprint_c_condition. (write_attr_value): Likewise. * genconditions.c (write_one_condition): Use rtx_reader_ptr for call to print_md_ptr_loc. (write_one_condition): Likewise for calls to print_c_condition. * genconstants.c: Include "statistics.h" and "vec.h". (main): Update for conversion to member functions. * genemit.c (emit_c_code): Use rtx_reader_ptr for call to print_md_ptr_loc. * genenums.c: Include "statistics.h" and "vec.h". (main): Update for conversion of traverse_enum_types to a method. * genmddeps.c: Include "statistics.h" and "vec.h". * genoutput.c (process_template): Use rtx_reader_ptr for call to print_md_ptr_loc. * genpreds.c (write_predicate_subfunction): Likewise. (write_predicate_expr): Likewise for calls to print_c_condition. * genrecog.c (print_test): Likewise. * gensupport.c (process_rtx): Likewise for calls to copy_md_ptr_loc and join_c_conditions. (alter_test_for_insn): Likewise for call to join_c_conditions. (process_substs_on_one_elem): Likewise. (gen_mnemonic_setattr): Update for move of string_obstack to a field of rtx_reader. (mnemonic_htab_callback): Likewise. Fix formatting. (gen_mnemonic_attr): Likewise. * gentarget-def.c (def_target_insn): Use rtx_reader_ptr for calls to print_c_condition. * read-md.c: Include "statistics.h" and "vec.h". (string_obstack): Convert this global to field "m_string_obstack" of class rtx_reader. (ptr_locs): Likewise, as "m_ptr_locs". (ptr_loc_obstack): Likewise, as "m_ptr_loc_obstack". (joined_conditions): Likewise, as "m_joined_conditions". (joined_conditions_obstack): Likewise, as "m_joined_conditions_obstack". (md_constants): Likewise, as "m_md_constants". (enum_types): Likewise, as "m_enum_types". (set_md_ptr_loc): Convert to... (rtx_reader::set_md_ptr_loc): ...member function. (get_md_ptr_loc): Convert to... (rtx_reader::get_md_ptr_loc): ...member function. (copy_md_ptr_loc): Convert to... (rtx_reader::copy_md_ptr_loc): ...member function. (fprint_md_ptr_loc): Convert to... (rtx_reader::fprint_md_ptr_loc): ...member function. (print_md_ptr_loc): Convert to... (rtx_reader::print_md_ptr_loc): ...member function. (join_c_conditions): Convert to... (rtx_reader::join_c_conditions): ...member function. (fprint_c_condition): Convert to... (rtx_reader::fprint_c_condition): ...member function. (print_c_condition): Convert to... (rtx_reader::print_c_condition): ...member function. (read_name): Convert to... (rtx_reader::read_name): ...member function. (read_escape): Convert to... (rtx_reader::read_escape): ...member function. (read_quoted_string): Convert to... (rtx_reader::read_quoted_string): ...member function. (read_braced_string): Convert to... (rtx_reader::read_braced_string): ...member function. (read_string): Convert to... (rtx_reader::read_string): ...member function. (read_skip_construct): Convert to... (rtx_reader::read_skip_construct): ...member function. (handle_constants): Convert to... (rtx_reader::handle_constants): ...member function. (traverse_md_constants): Convert to... (rtx_reader::traverse_md_constants): ...member function. (handle_enum): Convert to... (rtx_reader::handle_enum): ...member function. (lookup_enum_type): Convert to... (rtx_reader::lookup_enum_type): ...member function. (traverse_enum_types): Convert to... (rtx_reader::traverse_enum_types): ...member function. (rtx_reader::rtx_reader): Move initializations of various former global data from rtx_reader::read_md_files to here, as fields, along with the call to unlock_std_streams. (rtx_reader::~rtx_reader): Clean up m_base_dir, and clean up the new fields. (rtx_reader::read_md_files): Move initializations of various global data from here to the ctor. * read-md.h (read_name): Convert to... (rtx_reader::read_name): ...member function. (rtx_reader::read_escape): New method decl. (read_quoted_string): Convert to... (rtx_reader::read_quoted_string): ...member function. (rtx_reader::read_braced_string): New method decl. (read_string): Convert to... (rtx_reader::read_string): ...member function. (rtx_reader::read_skip_construct): New method decl. (rtx_reader::set_md_ptr_loc): New method decl. (rtx_reader::get_md_ptr_loc): New method decl. (copy_md_ptr_loc): Convert to... (rtx_reader::copy_md_ptr_loc): ...member function. (fprint_md_ptr_loc): Convert to... (rtx_reader::fprint_md_ptr_loc): ...member function. (print_md_ptr_loc): Convert to... (rtx_reader::print_md_ptr_loc): ...member function. (rtx_reader::lookup_enum_type): New method decl. (rtx_reader::traverse_enum_types): New method decl. (rtx_reader::handle_constants): New method decl. (traverse_md_constants): Convert to... (rtx_reader::traverse_md_constants): ...member function. (rtx_reader::handle_enum): New method decl. (rtx_reader::join_c_conditions): New method decl. (fprint_c_condition): Convert to... (rtx_reader::fprint_c_condition): ...member function. (print_c_condition): Convert to... (rtx_reader::print_c_condition): ...member function. (rtx_reader::apply_iterator_to_string): New method decl. (rtx_reader::copy_rtx_for_iterators): New method decl. (rtx_reader::read_conditions): New method decl. (rtx_reader::record_potential_iterator_use): New method decl. (rtx_reader::read_mapping): New method decl. (rtx_reader::read_rtx): New method decl. (rtx_reader::read_rtx_code): New method decl. (rtx_reader::read_rtx_operand): New method decl. (rtx_reader::read_nested_rtx): New method decl. (rtx_reader::read_rtx_variadic): New method decl. (rtx_reader::get_string_obstack): New method. (rtx_reader::get_md_constants): New method. (string_obstack): Convert global variable decl to... (rtx_reader::m_string_obstack): ...this new field. (rtx_reader::m_ptr_locs): New field. (rtx_reader::m_ptr_loc_obstack): New field. (rtx_reader::m_joined_conditions): New field. (rtx_reader::m_joined_conditions_obstack): New field. (rtx_reader::m_md_constants): New field. (rtx_reader::m_enum_types): New field. * read-rtl.c (apply_iterator_to_string): Convert to... (rtx_reader::apply_iterator_to_string): ...member function. (copy_rtx_for_iterators): Convert to... (rtx_reader::copy_rtx_for_iterators): ...member function. (add_condition_to_string): Use rtx_reader_ptr for calls join_c_conditions. (apply_iterators): Use rtx_reader_ptr for calls to join_c_conditions and copy_rtx_for_iterators. (read_conditions): Convert to... (rtx_reader::read_conditions): ...member function. (record_potential_iterator_use): Convert to... (rtx_reader::record_potential_iterator_use): ...member function. (read_mapping): Convert to... (rtx_reader::read_mapping): ...member function. (read_subst_mapping): Use rtx_reader_ptr for read_string call. (read_rtx): Convert to... (rtx_reader::read_rtx): ...member function. (read_rtx_code): Convert to... (rtx_reader::read_rtx_code): ...member function. (read_rtx_operand): Convert to... (rtx_reader::read_rtx_operand): ...member function. Update for move of string_obstack to a field. (read_nested_rtx): Convert to.. (rtx_reader::read_nested_rtx): ...member function. (read_rtx_variadic): Convert to.. (rtx_reader::read_rtx_variadic): ...member function. From-SVN: r241293
2016-10-18 02:19:17 +02:00
rtx_reader_ptr->print_c_condition (XSTR (exp, 0));
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
break;
default:
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
gcc_unreachable ();
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
}
}
/* Write the MATCH_CODE expression EXP as a switch statement. */
static void
write_match_code_switch (rtx exp)
{
const char *codes = XSTR (exp, 0);
const char *path = XSTR (exp, 1);
const char *code;
fputs (" switch (GET_CODE (", stdout);
write_extract_subexp (path);
fputs ("))\n {\n", stdout);
while ((code = scan_comma_elt (&codes)) != 0)
{
fputs (" case ", stdout);
while (code < codes)
{
putchar (TOUPPER (*code));
code++;
}
alloc-pool.c, [...]: Add missing whitespace before "(". gcc/ * alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c, cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c, cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c, combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c, df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c, dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, errors.c, except.c, expmed.c, expr.c, file-find.c, final.c, fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c, gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c, genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c, genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c, gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c, gimple.h, godump.c, graphite-clast-to-gimple.c, graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c, graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c, hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c, lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c, mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c, pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c, predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c, profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c, reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c, statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h, system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c, tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h, tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c, tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c, tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c, tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c, tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c, varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing whitespace before "(". From-SVN: r203004
2013-09-28 10:42:34 +02:00
fputs (":\n", stdout);
}
}
/* Given a predicate expression EXP, write out a sequence of stmts
to evaluate it. This is similar to write_predicate_expr but can
generate efficient switch statements. */
static void
write_predicate_stmts (rtx exp)
{
switch (GET_CODE (exp))
{
case MATCH_CODE:
if (generate_switch_p (exp))
{
write_match_code_switch (exp);
puts (" return true;\n"
" default:\n"
" break;\n"
" }\n"
" return false;");
return;
}
break;
case AND:
if (generate_switch_p (XEXP (exp, 0)))
{
write_match_code_switch (XEXP (exp, 0));
puts (" break;\n"
" default:\n"
" return false;\n"
" }");
exp = XEXP (exp, 1);
}
break;
case IOR:
if (generate_switch_p (XEXP (exp, 0)))
{
write_match_code_switch (XEXP (exp, 0));
puts (" return true;\n"
" default:\n"
" break;\n"
" }");
exp = XEXP (exp, 1);
}
break;
case NOT:
if (generate_switch_p (XEXP (exp, 0)))
{
write_match_code_switch (XEXP (exp, 0));
puts (" return false;\n"
" default:\n"
" break;\n"
" }\n"
" return true;");
return;
}
break;
default:
break;
}
alloc-pool.c, [...]: Add missing whitespace before "(". gcc/ * alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c, cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c, cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c, combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c, df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c, dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, errors.c, except.c, expmed.c, expr.c, file-find.c, final.c, fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c, gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c, genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c, genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c, gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c, gimple.h, godump.c, graphite-clast-to-gimple.c, graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c, graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c, hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c, lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c, mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c, pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c, predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c, profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c, reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c, statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h, system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c, tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h, tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c, tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c, tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c, tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c, tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c, varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing whitespace before "(". From-SVN: r203004
2013-09-28 10:42:34 +02:00
fputs (" return ",stdout);
write_predicate_expr (exp);
alloc-pool.c, [...]: Add missing whitespace before "(". gcc/ * alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c, cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c, cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c, combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c, df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c, dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, errors.c, except.c, expmed.c, expr.c, file-find.c, final.c, fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c, gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c, genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c, genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c, gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c, gimple.h, godump.c, graphite-clast-to-gimple.c, graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c, graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c, hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c, lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c, mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c, pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c, predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c, profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c, reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c, statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h, system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c, tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h, tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c, tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c, tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c, tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c, tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c, varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing whitespace before "(". From-SVN: r203004
2013-09-28 10:42:34 +02:00
fputs (";\n", stdout);
}
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
/* Given a predicate, write out a complete C function to compute it. */
static void
write_one_predicate_function (struct pred_data *p)
{
if (!p->exp)
return;
write_predicate_subfunction (p);
add_mode_tests (p);
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
/* A normal predicate can legitimately not look at machine_mode
2014-05-06 18:25:05 +02:00
if it accepts only CONST_INTs and/or CONST_WIDE_INT and/or CONST_DOUBLEs. */
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
printf ("int\n%s (rtx op, machine_mode mode ATTRIBUTE_UNUSED)\n{\n",
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
p->name);
write_predicate_stmts (p->exp);
fputs ("}\n\n", stdout);
}
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
/* Constraints fall into two categories: register constraints
(define_register_constraint), and others (define_constraint,
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
define_memory_constraint, define_special_memory_constraint,
define_address_constraint). We work out automatically which of the
various old-style macros they correspond to, and produce
appropriate code. They all go in the same hash table so we can
verify that there are no duplicate names. */
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
/* All data from one constraint definition. */
struct constraint_data
{
struct constraint_data *next_this_letter;
struct constraint_data *next_textual;
const char *name;
const char *c_name; /* same as .name unless mangling is necessary */
file_location loc; /* location of definition */
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
size_t namelen;
const char *regclass; /* for register constraints */
rtx exp; /* for other constraints */
unsigned int is_register : 1;
unsigned int is_const_int : 1;
unsigned int is_const_dbl : 1;
unsigned int is_extra : 1;
unsigned int is_memory : 1;
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
unsigned int is_special_memory: 1;
unsigned int is_address : 1;
unsigned int maybe_allows_reg : 1;
unsigned int maybe_allows_mem : 1;
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
};
/* Overview of all constraints beginning with a given letter. */
static struct constraint_data *
constraints_by_letter_table[1<<CHAR_BIT];
/* For looking up all the constraints in the order that they appeared
in the machine description. */
static struct constraint_data *first_constraint;
static struct constraint_data **last_constraint_ptr = &first_constraint;
#define FOR_ALL_CONSTRAINTS(iter_) \
for (iter_ = first_constraint; iter_; iter_ = iter_->next_textual)
common.md: New file. gcc/ * common.md: New file. * doc/md.texi: Update description of generic, machine-independent constraints. * config/s390/constraints.md (e): Delete. * Makefile.in (md_file): Include common.md. * config/m32c/t-m32c (md_file): Likewise. * genpreds.c (general_mem): New array. (generic_constraint_letters): Remove constraints now defined by common.md. (add_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Allow the first character to be '<' or '>' as well. * genoutput.c (general_mem): New array. (indep_constraints): Remove constraints now defined by common.md. (note_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Remove special handling of 'm'. * ira-costs.c (record_reg_classes): Remove special handling of constraints now defined by common.md. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * lra-constraints.c (reg_class_from_constraints): Likewise. (process_alt_operands, process_address, curr_insn_transform): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * reload.c (push_secondary_reload, scratch_reload_class) (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * targhooks.c (default_secondary_reload): Likewise. * stmt.c (parse_output_constraint): Likewise. * recog.c (preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. (asm_operand_ok): Likewise, but add a comment saying why 'o' must be handled specially. From-SVN: r211475
2014-06-11 18:59:17 +02:00
/* Contraint letters that have a special meaning and that cannot be used
in define*_constraints. */
static const char generic_constraint_letters[] = "g";
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
/* Machine-independent code expects that constraints with these
(initial) letters will allow only (a subset of all) CONST_INTs. */
static const char const_int_constraints[] = "IJKLMNOP";
/* Machine-independent code expects that constraints with these
(initial) letters will allow only (a subset of all) CONST_DOUBLEs. */
static const char const_dbl_constraints[] = "GH";
/* Summary data used to decide whether to output various functions and
macro definitions. */
static unsigned int constraint_max_namelen;
static bool have_register_constraints;
static bool have_memory_constraints;
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
static bool have_special_memory_constraints;
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
static bool have_address_constraints;
static bool have_extra_constraints;
static bool have_const_int_constraints;
static unsigned int num_constraints;
static const constraint_data **enum_order;
static unsigned int register_start, register_end;
static unsigned int satisfied_start;
static unsigned int const_int_start, const_int_end;
static unsigned int memory_start, memory_end;
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
static unsigned int special_memory_start, special_memory_end;
static unsigned int address_start, address_end;
static unsigned int maybe_allows_none_start, maybe_allows_none_end;
static unsigned int maybe_allows_reg_start, maybe_allows_reg_end;
static unsigned int maybe_allows_mem_start, maybe_allows_mem_end;
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
/* Convert NAME, which contains angle brackets and/or underscores, to
a string that can be used as part of a C identifier. The string
comes from the rtl_obstack. */
static const char *
mangle (const char *name)
{
for (; *name; name++)
switch (*name)
{
case '_': obstack_grow (rtl_obstack, "__", 2); break;
case '<': obstack_grow (rtl_obstack, "_l", 2); break;
case '>': obstack_grow (rtl_obstack, "_g", 2); break;
default: obstack_1grow (rtl_obstack, *name); break;
}
obstack_1grow (rtl_obstack, '\0');
cse.c (approx_reg_cost_1, cse_insn): Fix -Wc++-compat and/or -Wcast-qual warnings. * cse.c (approx_reg_cost_1, cse_insn): Fix -Wc++-compat and/or -Wcast-qual warnings. * gcc.c (process_command): Likewise. * genattrtab.c (oballoc): Use XOBNEW. (oballocvec): Define. (attr_hash_add_rtx, attr_hash_add_string, attr_string, get_attr_value, fill_attr, make_length_attrs, gen_attr, gen_insn, gen_delay, find_attr, gen_insn_reserv, gen_bypass_1): Fix -Wc++-compat and/or -Wcast-qual warnings. * genautomata.c (XCREATENODE, XCREATENODEVEC, XCREATENODEVAR, XCOPYNODE, XCOPYNODEVEC, XCOPYNODEVAR): New. (gen_cpu_unit, gen_query_cpu_unit, gen_bypass, gen_excl_set, gen_presence_absence_set, gen_automaton, gen_regexp_el, gen_regexp_repeat, gen_regexp_allof, gen_regexp_oneof, gen_regexp_sequence, gen_reserv, gen_insn_reserv, process_excls, add_excls, process_presence_absence_names, process_presence_absence_patterns, add_presence_absence, process_regexp, add_advance_cycle_insn_decl, get_free_alt_state, get_free_state, add_arc, get_free_automata_list_el, form_reserv_sets_list, copy_insn_regexp, transform_1, transform_2, transform_3, cache_presence, create_ainsns, create_automata, create_state_ainsn_table, dfa_insn_code_enlarge, output_trans_func, output_min_issue_delay_func, output_dead_lock_func, output_reset_func, output_get_cpu_unit_code_func, output_dfa_start_func, expand_automata): Likewise. * genextract.c (gen_insn): Likewise. * gengtype-lex.l: Likewise. * gengtype.c (read_input_list, adjust_field_type, process_gc_options): Likewise. * genoutput.c (note_constraint): Likewise. * genpreds.c (mangle, add_constraint): Likewise. * genrecog.c (process_define_predicate, new_decision, add_to_sequence): Likewise. * gensupport.c (record_insn_name): Likewise. From-SVN: r137135
2008-06-26 02:22:12 +02:00
return XOBFINISH (rtl_obstack, const char *);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
}
/* Add one constraint, of any sort, to the tables. NAME is its name;
REGCLASS is the register class, if any; EXP is the expression to
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
test, if any; IS_MEMORY, IS_SPECIAL_MEMORY and IS_ADDRESS indicate
memory, special memory, and address constraints, respectively; LOC
is the .md file location.
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
Not all combinations of arguments are valid; most importantly,
REGCLASS is mutually exclusive with EXP, and
IS_MEMORY/IS_SPECIAL_MEMORY/IS_ADDRESS are only meaningful for
constraints with EXP.
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
This function enforces all syntactic and semantic rules about what
constraints can be defined. */
static void
add_constraint (const char *name, const char *regclass,
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
rtx exp, bool is_memory, bool is_special_memory,
bool is_address, file_location loc)
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
{
struct constraint_data *c, **iter, **slot;
const char *p;
bool need_mangled_name = false;
bool is_const_int;
bool is_const_dbl;
size_t namelen;
common.md: New file. gcc/ * common.md: New file. * doc/md.texi: Update description of generic, machine-independent constraints. * config/s390/constraints.md (e): Delete. * Makefile.in (md_file): Include common.md. * config/m32c/t-m32c (md_file): Likewise. * genpreds.c (general_mem): New array. (generic_constraint_letters): Remove constraints now defined by common.md. (add_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Allow the first character to be '<' or '>' as well. * genoutput.c (general_mem): New array. (indep_constraints): Remove constraints now defined by common.md. (note_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Remove special handling of 'm'. * ira-costs.c (record_reg_classes): Remove special handling of constraints now defined by common.md. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * lra-constraints.c (reg_class_from_constraints): Likewise. (process_alt_operands, process_address, curr_insn_transform): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * reload.c (push_secondary_reload, scratch_reload_class) (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * targhooks.c (default_secondary_reload): Likewise. * stmt.c (parse_output_constraint): Likewise. * recog.c (preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. (asm_operand_ok): Likewise, but add a comment saying why 'o' must be handled specially. From-SVN: r211475
2014-06-11 18:59:17 +02:00
if (strcmp (name, "TARGET_MEM_CONSTRAINT") == 0)
name = general_mem;
if (exp && validate_exp (exp, name, loc))
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return;
for (p = name; *p; p++)
if (!ISALNUM (*p))
{
if (*p == '<' || *p == '>' || *p == '_')
need_mangled_name = true;
else
{
error_at (loc, "constraint name '%s' must be composed of letters,"
" digits, underscores, and angle brackets", name);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return;
}
}
if (strchr (generic_constraint_letters, name[0]))
{
if (name[1] == '\0')
error_at (loc, "constraint letter '%s' cannot be "
"redefined by the machine description", name);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
else
error_at (loc, "constraint name '%s' cannot be defined by the machine"
" description, as it begins with '%c'", name, name[0]);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return;
}
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
namelen = strlen (name);
slot = &constraints_by_letter_table[(unsigned int)name[0]];
for (iter = slot; *iter; iter = &(*iter)->next_this_letter)
{
/* This causes slot to end up pointing to the
next_this_letter field of the last constraint with a name
of equal or greater length than the new constraint; hence
the new constraint will be inserted after all previous
constraints with names of the same length. */
if ((*iter)->namelen >= namelen)
slot = iter;
if (!strcmp ((*iter)->name, name))
{
error_at (loc, "redefinition of constraint '%s'", name);
message_at ((*iter)->loc, "previous definition is here");
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return;
}
else if (!strncmp ((*iter)->name, name, (*iter)->namelen))
{
error_at (loc, "defining constraint '%s' here", name);
message_at ((*iter)->loc, "renders constraint '%s' "
"(defined here) a prefix", (*iter)->name);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return;
}
else if (!strncmp ((*iter)->name, name, namelen))
{
error_at (loc, "constraint '%s' is a prefix", name);
message_at ((*iter)->loc, "of constraint '%s' (defined here)",
(*iter)->name);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return;
}
}
is_const_int = strchr (const_int_constraints, name[0]) != 0;
is_const_dbl = strchr (const_dbl_constraints, name[0]) != 0;
if (is_const_int || is_const_dbl)
{
enum rtx_code appropriate_code
= is_const_int ? CONST_INT : CONST_DOUBLE;
/* Consider relaxing this requirement in the future. */
if (regclass
|| GET_CODE (exp) != AND
|| GET_CODE (XEXP (exp, 0)) != MATCH_CODE
|| strcmp (XSTR (XEXP (exp, 0), 0),
GET_RTX_NAME (appropriate_code)))
{
if (name[1] == '\0')
error_at (loc, "constraint letter '%c' is reserved "
"for %s constraints", name[0],
GET_RTX_NAME (appropriate_code));
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
else
error_at (loc, "constraint names beginning with '%c' "
"(%s) are reserved for %s constraints",
name[0], name, GET_RTX_NAME (appropriate_code));
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return;
}
if (is_memory)
{
if (name[1] == '\0')
error_at (loc, "constraint letter '%c' cannot be a "
"memory constraint", name[0]);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
else
error_at (loc, "constraint name '%s' begins with '%c', "
"and therefore cannot be a memory constraint",
name, name[0]);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return;
}
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
else if (is_special_memory)
{
if (name[1] == '\0')
error_at (loc, "constraint letter '%c' cannot be a "
"special memory constraint", name[0]);
else
error_at (loc, "constraint name '%s' begins with '%c', "
"and therefore cannot be a special memory constraint",
name, name[0]);
return;
}
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
else if (is_address)
{
if (name[1] == '\0')
error_at (loc, "constraint letter '%c' cannot be an "
"address constraint", name[0]);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
else
error_at (loc, "constraint name '%s' begins with '%c', "
"and therefore cannot be an address constraint",
name, name[0]);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
return;
}
}
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
cse.c (approx_reg_cost_1, cse_insn): Fix -Wc++-compat and/or -Wcast-qual warnings. * cse.c (approx_reg_cost_1, cse_insn): Fix -Wc++-compat and/or -Wcast-qual warnings. * gcc.c (process_command): Likewise. * genattrtab.c (oballoc): Use XOBNEW. (oballocvec): Define. (attr_hash_add_rtx, attr_hash_add_string, attr_string, get_attr_value, fill_attr, make_length_attrs, gen_attr, gen_insn, gen_delay, find_attr, gen_insn_reserv, gen_bypass_1): Fix -Wc++-compat and/or -Wcast-qual warnings. * genautomata.c (XCREATENODE, XCREATENODEVEC, XCREATENODEVAR, XCOPYNODE, XCOPYNODEVEC, XCOPYNODEVAR): New. (gen_cpu_unit, gen_query_cpu_unit, gen_bypass, gen_excl_set, gen_presence_absence_set, gen_automaton, gen_regexp_el, gen_regexp_repeat, gen_regexp_allof, gen_regexp_oneof, gen_regexp_sequence, gen_reserv, gen_insn_reserv, process_excls, add_excls, process_presence_absence_names, process_presence_absence_patterns, add_presence_absence, process_regexp, add_advance_cycle_insn_decl, get_free_alt_state, get_free_state, add_arc, get_free_automata_list_el, form_reserv_sets_list, copy_insn_regexp, transform_1, transform_2, transform_3, cache_presence, create_ainsns, create_automata, create_state_ainsn_table, dfa_insn_code_enlarge, output_trans_func, output_min_issue_delay_func, output_dead_lock_func, output_reset_func, output_get_cpu_unit_code_func, output_dfa_start_func, expand_automata): Likewise. * genextract.c (gen_insn): Likewise. * gengtype-lex.l: Likewise. * gengtype.c (read_input_list, adjust_field_type, process_gc_options): Likewise. * genoutput.c (note_constraint): Likewise. * genpreds.c (mangle, add_constraint): Likewise. * genrecog.c (process_define_predicate, new_decision, add_to_sequence): Likewise. * gensupport.c (record_insn_name): Likewise. From-SVN: r137135
2008-06-26 02:22:12 +02:00
c = XOBNEW (rtl_obstack, struct constraint_data);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
c->name = name;
c->c_name = need_mangled_name ? mangle (name) : name;
c->loc = loc;
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
c->namelen = namelen;
c->regclass = regclass;
c->exp = exp;
c->is_register = regclass != 0;
c->is_const_int = is_const_int;
c->is_const_dbl = is_const_dbl;
c->is_extra = !(regclass || is_const_int || is_const_dbl);
c->is_memory = is_memory;
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
c->is_special_memory = is_special_memory;
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
c->is_address = is_address;
c->maybe_allows_reg = true;
c->maybe_allows_mem = true;
if (exp)
{
char codes[NUM_RTX_CODE];
compute_test_codes (exp, loc, codes);
if (!codes[REG] && !codes[SUBREG])
c->maybe_allows_reg = false;
if (!codes[MEM])
c->maybe_allows_mem = false;
}
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
c->next_this_letter = *slot;
*slot = c;
/* Insert this constraint in the list of all constraints in textual
order. */
c->next_textual = 0;
*last_constraint_ptr = c;
last_constraint_ptr = &c->next_textual;
constraint_max_namelen = MAX (constraint_max_namelen, strlen (name));
have_register_constraints |= c->is_register;
have_const_int_constraints |= c->is_const_int;
have_extra_constraints |= c->is_extra;
have_memory_constraints |= c->is_memory;
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
have_special_memory_constraints |= c->is_special_memory;
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
have_address_constraints |= c->is_address;
num_constraints += 1;
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
}
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
/* Process a DEFINE_CONSTRAINT, DEFINE_MEMORY_CONSTRAINT,
DEFINE_SPECIAL_MEMORY_CONSTRAINT, or DEFINE_ADDRESS_CONSTRAINT
expression, C. */
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
static void
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
process_define_constraint (md_rtx_info *info)
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
{
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
add_constraint (XSTR (info->def, 0), 0, XEXP (info->def, 2),
GET_CODE (info->def) == DEFINE_MEMORY_CONSTRAINT,
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
GET_CODE (info->def) == DEFINE_SPECIAL_MEMORY_CONSTRAINT,
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
GET_CODE (info->def) == DEFINE_ADDRESS_CONSTRAINT,
info->loc);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
}
/* Process a DEFINE_REGISTER_CONSTRAINT expression, C. */
static void
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
process_define_register_constraint (md_rtx_info *info)
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
{
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
add_constraint (XSTR (info->def, 0), XSTR (info->def, 1),
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
0, false, false, false, info->loc);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
}
/* Put the constraints into enum order. We want to keep constraints
of the same type together so that query functions can be simple
range checks. */
static void
choose_enum_order (void)
{
struct constraint_data *c;
enum_order = XNEWVEC (const constraint_data *, num_constraints);
unsigned int next = 0;
register_start = next;
FOR_ALL_CONSTRAINTS (c)
if (c->is_register)
enum_order[next++] = c;
register_end = next;
satisfied_start = next;
const_int_start = next;
FOR_ALL_CONSTRAINTS (c)
if (c->is_const_int)
enum_order[next++] = c;
const_int_end = next;
memory_start = next;
FOR_ALL_CONSTRAINTS (c)
if (c->is_memory)
enum_order[next++] = c;
memory_end = next;
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
special_memory_start = next;
FOR_ALL_CONSTRAINTS (c)
if (c->is_special_memory)
enum_order[next++] = c;
special_memory_end = next;
address_start = next;
FOR_ALL_CONSTRAINTS (c)
if (c->is_address)
enum_order[next++] = c;
address_end = next;
maybe_allows_none_start = next;
FOR_ALL_CONSTRAINTS (c)
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
if (!c->is_register && !c->is_const_int && !c->is_memory
&& !c->is_special_memory && !c->is_address
&& !c->maybe_allows_reg && !c->maybe_allows_mem)
enum_order[next++] = c;
maybe_allows_none_end = next;
maybe_allows_reg_start = next;
FOR_ALL_CONSTRAINTS (c)
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
if (!c->is_register && !c->is_const_int && !c->is_memory
&& !c->is_special_memory && !c->is_address
&& c->maybe_allows_reg && !c->maybe_allows_mem)
enum_order[next++] = c;
maybe_allows_reg_end = next;
maybe_allows_mem_start = next;
FOR_ALL_CONSTRAINTS (c)
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
if (!c->is_register && !c->is_const_int && !c->is_memory
&& !c->is_special_memory && !c->is_address
&& !c->maybe_allows_reg && c->maybe_allows_mem)
enum_order[next++] = c;
maybe_allows_mem_end = next;
FOR_ALL_CONSTRAINTS (c)
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
if (!c->is_register && !c->is_const_int && !c->is_memory
&& !c->is_special_memory && !c->is_address
&& c->maybe_allows_reg && c->maybe_allows_mem)
enum_order[next++] = c;
gcc_assert (next == num_constraints);
}
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
/* Write out an enumeration with one entry per machine-specific
constraint. */
static void
write_enum_constraint_num (void)
{
fputs ("#define CONSTRAINT_NUM_DEFINED_P 1\n", stdout);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
fputs ("enum constraint_num\n"
"{\n"
" CONSTRAINT__UNKNOWN = 0", stdout);
for (unsigned int i = 0; i < num_constraints; ++i)
printf (",\n CONSTRAINT_%s", enum_order[i]->c_name);
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-12-09 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/invoke.texi (-fira-region): Describe new option. (-fira-algorithm): Change the values. * ira-conflicts.c (build_conflict_bit_table, build_allocno_conflicts): Use ira_reg_classes_intersect_p. (ira_build_conflicts): Use flag flag_ira_region instead of flag_ira_algorithm. Prohibit usage of callee-saved likely spilled base registers for allocnos crossing calls. * flags.h (enum ira_algorithm): Redefine. (enum ira_region): New. (flag_ira_region): New. * cfgloopanal.c (estimate_reg_pressure_cost): Use flag_ira_region instead of flag_ira_algorithm. * toplev.c (flag_ira_algorithm): Change the initial value. (flag_ira_region): New. * ira-int.h (ira_reg_classes_intersect_p, ira_reg_class_super_classes): New. * ira-color.c (update_copy_costs): Use ira_reg_classes_intersect_p. Use right class to find hard reg index. (update_conflict_hard_regno_costs): Ditto. Add a new parameter. (assign_hard_reg): Ditto. Pass additional argument to update_conflict_hard_regno_costs. Do not uncoalesce for priority coloring. (allocno_priorities, setup_allocno_priorities, allocno_priority_compare_func): Move before color_allocnos. (color_allocnos): Add priority coloring. Use flag flag_ira_region instead of flag_ira_algorithm. (move_spill_restore): Check classes of the same reg allocno from different regions. (update_curr_costs): Use ira_reg_classes_intersect_p. (ira_reassign_conflict_allocnos): Ditto. * opts.c (decode_options): Always set up flag_ira. Set up flag_ira_algorithm. Warn CB can not be used for architecture. (common_handle_option): Modify code for -fira-algorithm. Add code to process -fira-region. * ira-lives.c (update_allocno_pressure_excess_length): Process superclasses too. (set_allocno_live, clear_allocno_live, mark_reg_live, mark_reg_dead, process_bb_node_lives): Ditto. * ira-emit.c (ira_emit): Fix insn codes. * ira-build.c (propagate_allocno_info): Use flag flag_ira_region instead of flag_ira_algorithm. (allocno_range_compare_func): Ignore classes for priority coloring. (setup_min_max_conflict_allocno_ids): Ditto. (ira_flattening): Use ira_reg_classes_intersect_p. * genpreds.c (write_enum_constraint_num): Output CONSTRAINT__LIMIT. * common.opt (fira-algorithm): Modify. (fira-region): New. * ira.c (setup_class_hard_regs): Initialize. (setup_cover_and_important_classes): Modify code setting class related info for priority coloring. (setup_class_translate): Ditto. (ira_reg_classes_intersect_p, ira_reg_class_super_classes): New. (setup_reg_class_intersect_union): Rename to setup_reg_class_relations. Add code for setting up new variables. (find_reg_class_closure): Do not check targetm.ira_cover_classes. (ira): Use flag flag_ira_region instead of flag_ira_algorithm. * ira-costs.c (common_classes): New. (print_costs): Use flag flag_ira_region instead of flag_ira_algorithm. (find_allocno_class_costs): Ditto. Use common_classes. Translate alt_class. (ira_costs): Allocate/deallocate common_classes. * config/m32c/m32.h (REG_ALLOC_ORDER): Add reg 19. (REG_CLASS_CONTENTS, reg_class, REG_CLASS_NAMES): New entries for R02A_REGS. * reload1.c (choose_reload_regs): Use MODE_INT for partial ints in smallest_mode_for_size. From-SVN: r142610
2008-12-09 22:25:11 +01:00
puts (",\n CONSTRAINT__LIMIT\n};\n");
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
}
/* Write out a function which looks at a string and determines what
constraint name, if any, it begins with. */
static void
write_lookup_constraint_1 (void)
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
{
unsigned int i;
puts ("enum constraint_num\n"
"lookup_constraint_1 (const char *str)\n"
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
"{\n"
" switch (str[0])\n"
" {");
alloc-pool.c, [...]: Add missing whitespace before "(". gcc/ * alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c, cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c, cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c, combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c, df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c, dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, errors.c, except.c, expmed.c, expr.c, file-find.c, final.c, fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c, gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c, genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c, genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c, gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c, gimple.h, godump.c, graphite-clast-to-gimple.c, graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c, graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c, hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c, lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c, mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c, pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c, predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c, profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c, reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c, statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h, system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c, tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h, tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c, tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c, tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c, tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c, tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c, varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing whitespace before "(". From-SVN: r203004
2013-09-28 10:42:34 +02:00
for (i = 0; i < ARRAY_SIZE (constraints_by_letter_table); i++)
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
{
struct constraint_data *c = constraints_by_letter_table[i];
if (!c)
continue;
printf (" case '%c':\n", i);
if (c->namelen == 1)
printf (" return CONSTRAINT_%s;\n", c->c_name);
else
{
do
{
printf (" if (!strncmp (str + 1, \"%s\", %lu))\n"
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
" return CONSTRAINT_%s;\n",
c->name + 1, (unsigned long int) c->namelen - 1,
c->c_name);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
c = c->next_this_letter;
}
while (c);
puts (" break;");
}
}
puts (" default: break;\n"
" }\n"
" return CONSTRAINT__UNKNOWN;\n"
"}\n");
}
/* Write out an array that maps single-letter characters to their
constraints (if that fits in a character) or 255 if lookup_constraint_1
must be called. */
static void
write_lookup_constraint_array (void)
{
unsigned int i;
printf ("const unsigned char lookup_constraint_array[] = {\n ");
for (i = 0; i < ARRAY_SIZE (constraints_by_letter_table); i++)
{
if (i != 0)
printf (",\n ");
struct constraint_data *c = constraints_by_letter_table[i];
if (!c)
printf ("CONSTRAINT__UNKNOWN");
else if (c->namelen == 1)
printf ("MIN ((int) CONSTRAINT_%s, (int) UCHAR_MAX)", c->c_name);
else
printf ("UCHAR_MAX");
}
printf ("\n};\n\n");
}
/* Write out a function which looks at a string and determines what
the constraint name length is. */
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
static void
write_insn_constraint_len (void)
{
unsigned int i;
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
puts ("static inline size_t\n"
"insn_constraint_len (char fc, const char *str ATTRIBUTE_UNUSED)\n"
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
"{\n"
" switch (fc)\n"
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
" {");
alloc-pool.c, [...]: Add missing whitespace before "(". gcc/ * alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c, cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c, cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c, combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c, df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c, dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, errors.c, except.c, expmed.c, expr.c, file-find.c, final.c, fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c, gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c, genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c, genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c, gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c, gimple.h, godump.c, graphite-clast-to-gimple.c, graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c, graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c, hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c, lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c, mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c, pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c, predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c, profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c, reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c, statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h, system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c, tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h, tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c, tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c, tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c, tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c, tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c, varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing whitespace before "(". From-SVN: r203004
2013-09-28 10:42:34 +02:00
for (i = 0; i < ARRAY_SIZE (constraints_by_letter_table); i++)
{
struct constraint_data *c = constraints_by_letter_table[i];
if (!c
|| c->namelen == 1)
continue;
/* Constraints with multiple characters should have the same
length. */
{
struct constraint_data *c2 = c->next_this_letter;
size_t len = c->namelen;
while (c2)
{
if (c2->namelen != len)
error ("Multi-letter constraints with first letter '%c' "
"should have same length", i);
c2 = c2->next_this_letter;
}
}
printf (" case '%c': return %lu;\n",
i, (unsigned long int) c->namelen);
}
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
puts (" default: break;\n"
" }\n"
" return 1;\n"
"}\n");
}
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
/* Write out the function which computes the register class corresponding
to a register constraint. */
static void
write_reg_class_for_constraint_1 (void)
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
{
struct constraint_data *c;
puts ("enum reg_class\n"
"reg_class_for_constraint_1 (enum constraint_num c)\n"
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
"{\n"
" switch (c)\n"
" {");
FOR_ALL_CONSTRAINTS (c)
if (c->is_register)
printf (" case CONSTRAINT_%s: return %s;\n", c->c_name, c->regclass);
puts (" default: break;\n"
" }\n"
" return NO_REGS;\n"
"}\n");
}
/* Write out the functions which compute whether a given value matches
a given non-register constraint. */
static void
genemit.c (main): Add tm-constrs.h to included headers. * genemit.c (main): Add tm-constrs.h to included headers. * genoutput.c (output_prologue): Add tm-constrs.h to included headers. * genpeep.c (main): Add tm-constrs.h to included headers. * genpreds.c (write_satisfies_constraint_fns): Rename to ... (write_tm_constrs_h): this and write complete file. (write_tm_preds_h): Do not emit satisfies_constraint fns. (write_insn_preds_c): Add tm-constrs.h to included headers. (gen_constrs): New variable. (parse_option): Parse "-c". (main): Invoke write_tm_constrs_h. * genrecog.c (write_header): Add tm-constrs.h to included headers. * Makefile.in (STAGECOPYSTUFF): Add tm-constrs.h. (object_out_file): Add tm-constrs.h dependency. (insn-emit.o): Same. (insn-output.o): Same. (insn-peep.o): Same. (insn-preds.o): Same. (insn-recog.o): Same. (tm-constsr.h): New target. (s-constrs-h): New target. * config/rs6000/constraints.md: New file. * config/rs6000/rs6000.c: Include tm-constrs.h. (num_insn_constant_wide): Convert to satisfies_constraint. (rs6000_rtx_costs): Convert to satisfies_constraint. * config/rs6000/rs6000.h (REG_CLASS_FROM_LETTER): Delete. (CONST_OK_FOR_LETTER_P): Delete. (CONST_DOUBLE_OK_FOR_LETTER_P): Delete. (EXTRA_CONSTRAINT): Delete. (EXTRA_MEMORY_CONSTRAINT): Delete. (EXTRA_ADDRESS_CONSTRAINT): Delete. * config/rs6000/predicates.md: Convert to satisfies_constraint. * config/rs6000/rs6000.md: Include constraints.md. Convert to satisfies_constraint. * config/i386/i386.c: Include tm-constrs.h. From-SVN: r112508
2006-03-29 23:07:12 +02:00
write_tm_constrs_h (void)
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
{
struct constraint_data *c;
genemit.c (main): Add tm-constrs.h to included headers. * genemit.c (main): Add tm-constrs.h to included headers. * genoutput.c (output_prologue): Add tm-constrs.h to included headers. * genpeep.c (main): Add tm-constrs.h to included headers. * genpreds.c (write_satisfies_constraint_fns): Rename to ... (write_tm_constrs_h): this and write complete file. (write_tm_preds_h): Do not emit satisfies_constraint fns. (write_insn_preds_c): Add tm-constrs.h to included headers. (gen_constrs): New variable. (parse_option): Parse "-c". (main): Invoke write_tm_constrs_h. * genrecog.c (write_header): Add tm-constrs.h to included headers. * Makefile.in (STAGECOPYSTUFF): Add tm-constrs.h. (object_out_file): Add tm-constrs.h dependency. (insn-emit.o): Same. (insn-output.o): Same. (insn-peep.o): Same. (insn-preds.o): Same. (insn-recog.o): Same. (tm-constsr.h): New target. (s-constrs-h): New target. * config/rs6000/constraints.md: New file. * config/rs6000/rs6000.c: Include tm-constrs.h. (num_insn_constant_wide): Convert to satisfies_constraint. (rs6000_rtx_costs): Convert to satisfies_constraint. * config/rs6000/rs6000.h (REG_CLASS_FROM_LETTER): Delete. (CONST_OK_FOR_LETTER_P): Delete. (CONST_DOUBLE_OK_FOR_LETTER_P): Delete. (EXTRA_CONSTRAINT): Delete. (EXTRA_MEMORY_CONSTRAINT): Delete. (EXTRA_ADDRESS_CONSTRAINT): Delete. * config/rs6000/predicates.md: Convert to satisfies_constraint. * config/rs6000/rs6000.md: Include constraints.md. Convert to satisfies_constraint. * config/i386/i386.c: Include tm-constrs.h. From-SVN: r112508
2006-03-29 23:07:12 +02:00
printf ("\
/* Generated automatically by the program '%s'\n\
Introduce class rtx_reader Bundle up various global variables within gensupport.c into a class rtx_reader, with a view towards making it easier to run the code more than once in-process. gcc/ChangeLog: * genconstants.c (main): Introduce noop_reader and convert call to read_md_files to a method call. * genenums.c (main): Likewise. * genmddeps.c (main): Likewise. * genpreds.c (write_tm_constrs_h): Replace use of "in_fname" with rtx_reader_ptr->get_top_level_filename (). (write_tm_preds_h): Likewise. (write_insn_preds_c): Likewise. * gensupport.c (class gen_reader): New subclass of rtx_reader. (rtx_handle_directive): Convert to... (gen_reader::handle_unknown_directive): ...this. (init_rtx_reader_args_cb): Convert return type from bool to rtx_reader *. Create a gen_reader instance, using it for the call to read_md_files. Return it if no errors occur. (init_rtx_reader_args): Convert return type from bool to rtx_reader *. * gensupport.h (init_rtx_reader_args_cb): Likewise. (init_rtx_reader_args_cb): Likewise. * read-md.c (struct file_name_list): Move to class rtx_reader. (read_md_file): Delete in favor of rtx_reader::m_read_md_file. (read_md_filename): Delete in favor of rtx_reader::m_read_md_filename. (read_md_lineno): Delete in favor of rtx_reader::m_read_md_lineno. (in_fname): Delete in favor of rtx_reader::m_toplevel_fname. (base_dir): Delete in favor of rtx_reader::m_base_dir. (first_dir_md_include): Delete in favor of rtx_reader::m_first_dir_md_include. (last_dir_md_include_ptr): Delete in favor of rtx_reader::m_last_dir_md_include_ptr. (max_include_len): Delete. (rtx_reader_ptr): New. (fatal_with_file_and_line): Use get_filename and get_lineno accessors of rtx_reader_ptr. (require_char_ws): Likewise. (rtx_reader::read_char): New method, based on ::read_char. (rtx_reader::unread_char): New method, based on ::unread_char. (read_escape): Use get_filename and get_lineno accessors of rtx_reader_ptr. (read_braced_string): Use get_lineno accessor of rtx_reader_ptr. (read_string): Use get_filename and get_lineno accessors of rtx_reader_ptr. (rtx_reader::rtx_reader): New ctor. (rtx_reader::~rtx_reader): New dtor. (handle_include): Convert from a function to... (rtx_reader::handle_include): ...this method, converting handle_directive from a callback to a virtual function. (handle_file): Likewise, converting to... (rtx_reader::handle_file): ...this method. (handle_toplevel_file): Likewise, converting to... (rtx_reader::handle_toplevel_file): ...this method. (rtx_reader::get_current_location): New method. (parse_include): Convert from a function to... (rtx_reader::add_include_path): ...this method, dropping redundant update to unused max_include_len. (read_md_files): Convert from a function to... (rtx_reader::read_md_files): ...this method, converting handle_directive from a callback to a virtual function. (noop_reader::handle_unknown_directive): New method. * read-md.h (directive_handler_t): Delete this typedef. (in_fname): Delete. (read_md_file): Delete. (read_md_lineno): Delete. (read_md_filename): Delete. (class rtx_reader): New class. (rtx_reader_ptr): New decl. (class noop_reader): New subclass of rtx_reader. (read_char): Reimplement in terms of rtx_reader::read_char. (unread_char): Reimplement in terms of rtx_reader::unread_char. (read_md_files): Delete. * read-rtl.c (read_rtx_code): Update for deletion of globals read_md_filename and read_md_lineno. From-SVN: r240333
2016-09-21 22:55:06 +02:00
from the machine description file '%s'. */\n\n", progname,
Split class rtx_reader into md_reader vs rtx_reader This moves read_rtx and friends into rtx_reader, and splits rtx_reader into two classes: class md_reader: has responsibility for reading chars, managing include files, top-level directives etc. It is the read-md.o part. class rtx_reader, a subclass, has the code for reading hierarchical rtx expressions using the format codes. It is the read-rtl.o part. This split is needed by a followup patch, which converts read_rtx_operand to a virtual function of rtx_reader. To do this, instances of rtx_reader (or its subclasses) need a vtable, which needs to include a ptr to the code in read-rtl.o. Splitting it up allows the gen* tools that currently purely use read-md.o to continue to do so. gcc/ChangeLog: * genpreds.c (write_tm_constrs_h): Update for renaming of rtx_reader_ptr to md_reader_ptr. (write_tm_preds_h): Likewise. (write_insn_preds_c): Likewise. * read-md.c (rtx_reader_ptr): Rename to... (md_reader_ptr): ...this, and convert from an rtx_reader * to a md_reader *. (rtx_reader::set_md_ptr_loc): Rename to... (md_reader::set_md_ptr_loc): ...this. (rtx_reader::get_md_ptr_loc): Rename to... (md_reader::get_md_ptr_loc): ...this. (rtx_reader::copy_md_ptr_loc): Rename to... (md_reader::copy_md_ptr_loc): ...this. (rtx_reader::fprint_md_ptr_loc): Rename to... (md_reader::fprint_md_ptr_loc): ...this. (rtx_reader::print_md_ptr_loc): Rename to... (md_reader::print_md_ptr_loc): ...this. (rtx_reader::join_c_conditions): Rename to... (md_reader::join_c_conditions): ...this. (rtx_reader::fprint_c_condition): ...this. (rtx_reader::print_c_condition): Rename to... (md_reader::print_c_condition): ...this. (fatal_with_file_and_line): Update for renaming of rtx_reader_ptr to md_reader_ptr. (rtx_reader::require_char): Rename to... (md_reader::require_char): ...this. (rtx_reader::require_char_ws): Rename to... (md_reader::require_char_ws): ...this. (rtx_reader::require_word_ws): Rename to... (md_reader::require_word_ws): ...this. (rtx_reader::read_char): Rename to... (md_reader::read_char): ...this. (rtx_reader::unread_char): Rename to... (md_reader::unread_char): ...this. (rtx_reader::peek_char): Rename to... (md_reader::peek_char): ...this. (rtx_reader::read_name): Rename to... (md_reader::read_name): ...this. (rtx_reader::read_escape): Rename to... (md_reader::read_escape): ...this. (rtx_reader::read_quoted_string): Rename to... (md_reader::read_quoted_string): ...this. (rtx_reader::read_braced_string): Rename to... (md_reader::read_braced_string): ...this. (rtx_reader::read_string): Rename to... (md_reader::read_string): ...this. (rtx_reader::read_skip_construct): Rename to... (md_reader::read_skip_construct): ...this. (rtx_reader::handle_constants): Rename to... (md_reader::handle_constants): ...this. (rtx_reader::traverse_md_constants): Rename to... (md_reader::traverse_md_constants): ...this. (rtx_reader::handle_enum): Rename to... (md_reader::handle_enum): ...this. (rtx_reader::lookup_enum_type): Rename to... (md_reader::lookup_enum_type): ...this. (rtx_reader::traverse_enum_types): Rename to... (md_reader::traverse_enum_types): ...this. (rtx_reader::rtx_reader): Rename to... (md_reader::md_reader): ...this, and update for renaming of rtx_reader_ptr to md_reader_ptr. (rtx_reader::~rtx_reader): Rename to... (md_reader::~md_reader): ...this, and update for renaming of rtx_reader_ptr to md_reader_ptr. (rtx_reader::handle_include): Rename to... (md_reader::handle_include): ...this. (rtx_reader::handle_file): Rename to... (md_reader::handle_file): ...this. (rtx_reader::handle_toplevel_file): Rename to... (md_reader::handle_toplevel_file): ...this. (rtx_reader::get_current_location): Rename to... (md_reader::get_current_location): ...this. (rtx_reader::add_include_path): Rename to... (md_reader::add_include_path): ...this. (rtx_reader::read_md_files): Rename to... (md_reader::read_md_files): ...this. * read-md.h (class rtx_reader): Split into... (class md_reader): ...new class. (rtx_reader_ptr): Rename to... (md_reader_ptr): ...this, and convert to a md_reader *. (class noop_reader): Update base class to be md_reader. (class rtx_reader): Reintroduce as a subclass of md_reader. (rtx_reader_ptr): Reintroduce as a rtx_reader *. (read_char): Update for renaming of rtx_reader_ptr to md_reader_ptr. (unread_char): Likewise. * read-rtl.c (rtx_reader_ptr): New global. (rtx_reader::apply_iterator_to_string): Rename to... (md_reader::apply_iterator_to_string): ...this. (rtx_reader::copy_rtx_for_iterators): Rename to... (md_reader::copy_rtx_for_iterators): ...this. (rtx_reader::read_conditions): Rename to... (md_reader::read_conditions): ...this. (rtx_reader::record_potential_iterator_use): Rename to... (md_reader::record_potential_iterator_use): ...this. (rtx_reader::read_mapping): Rename to... (md_reader::read_mapping): ...this. (rtx_reader::read_rtx): Use rtx_reader_ptr when calling read_rtx_code. (rtx_reader::read_rtx_operand): Use get_string_obstack rather than directly accessing m_string_obstack. (rtx_reader::rtx_reader): New ctor. (rtx_reader::~rtx_reader): New dtor. From-SVN: r243426
2016-12-08 02:51:04 +01:00
md_reader_ptr->get_top_level_filename ());
genemit.c (main): Add tm-constrs.h to included headers. * genemit.c (main): Add tm-constrs.h to included headers. * genoutput.c (output_prologue): Add tm-constrs.h to included headers. * genpeep.c (main): Add tm-constrs.h to included headers. * genpreds.c (write_satisfies_constraint_fns): Rename to ... (write_tm_constrs_h): this and write complete file. (write_tm_preds_h): Do not emit satisfies_constraint fns. (write_insn_preds_c): Add tm-constrs.h to included headers. (gen_constrs): New variable. (parse_option): Parse "-c". (main): Invoke write_tm_constrs_h. * genrecog.c (write_header): Add tm-constrs.h to included headers. * Makefile.in (STAGECOPYSTUFF): Add tm-constrs.h. (object_out_file): Add tm-constrs.h dependency. (insn-emit.o): Same. (insn-output.o): Same. (insn-peep.o): Same. (insn-preds.o): Same. (insn-recog.o): Same. (tm-constsr.h): New target. (s-constrs-h): New target. * config/rs6000/constraints.md: New file. * config/rs6000/rs6000.c: Include tm-constrs.h. (num_insn_constant_wide): Convert to satisfies_constraint. (rs6000_rtx_costs): Convert to satisfies_constraint. * config/rs6000/rs6000.h (REG_CLASS_FROM_LETTER): Delete. (CONST_OK_FOR_LETTER_P): Delete. (CONST_DOUBLE_OK_FOR_LETTER_P): Delete. (EXTRA_CONSTRAINT): Delete. (EXTRA_MEMORY_CONSTRAINT): Delete. (EXTRA_ADDRESS_CONSTRAINT): Delete. * config/rs6000/predicates.md: Convert to satisfies_constraint. * config/rs6000/rs6000.md: Include constraints.md. Convert to satisfies_constraint. * config/i386/i386.c: Include tm-constrs.h. From-SVN: r112508
2006-03-29 23:07:12 +02:00
puts ("\
#ifndef GCC_TM_CONSTRS_H\n\
#define GCC_TM_CONSTRS_H\n");
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
FOR_ALL_CONSTRAINTS (c)
if (!c->is_register)
{
bool needs_ival = needs_variable (c->exp, "ival");
bool needs_hval = needs_variable (c->exp, "hval");
bool needs_lval = needs_variable (c->exp, "lval");
bool needs_rval = needs_variable (c->exp, "rval");
bool needs_mode = (needs_variable (c->exp, "mode")
|| needs_hval || needs_lval || needs_rval);
bool needs_op = (needs_variable (c->exp, "op")
|| needs_ival || needs_mode);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
printf ("static inline bool\n"
"satisfies_constraint_%s (rtx %s)\n"
"{\n", c->c_name,
needs_op ? "op" : "ARG_UNUSED (op)");
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
if (needs_mode)
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
puts (" machine_mode mode = GET_MODE (op);");
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
if (needs_ival)
puts (" HOST_WIDE_INT ival = 0;");
if (needs_hval)
puts (" HOST_WIDE_INT hval = 0;");
if (needs_lval)
puts (" unsigned HOST_WIDE_INT lval = 0;");
if (needs_rval)
puts (" const REAL_VALUE_TYPE *rval = 0;");
if (needs_ival)
puts (" if (CONST_INT_P (op))\n"
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
" ival = INTVAL (op);");
2014-05-06 18:25:05 +02:00
#if TARGET_SUPPORTS_WIDE_INT
if (needs_lval || needs_hval)
error ("you can't use lval or hval");
#else
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
if (needs_hval)
puts (" if (GET_CODE (op) == CONST_DOUBLE && mode == VOIDmode)"
" hval = CONST_DOUBLE_HIGH (op);");
if (needs_lval)
puts (" if (GET_CODE (op) == CONST_DOUBLE && mode == VOIDmode)"
" lval = CONST_DOUBLE_LOW (op);");
2014-05-06 18:25:05 +02:00
#endif
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
if (needs_rval)
puts (" if (GET_CODE (op) == CONST_DOUBLE && mode != VOIDmode)"
" rval = CONST_DOUBLE_REAL_VALUE (op);");
write_predicate_stmts (c->exp);
fputs ("}\n", stdout);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
}
genemit.c (main): Add tm-constrs.h to included headers. * genemit.c (main): Add tm-constrs.h to included headers. * genoutput.c (output_prologue): Add tm-constrs.h to included headers. * genpeep.c (main): Add tm-constrs.h to included headers. * genpreds.c (write_satisfies_constraint_fns): Rename to ... (write_tm_constrs_h): this and write complete file. (write_tm_preds_h): Do not emit satisfies_constraint fns. (write_insn_preds_c): Add tm-constrs.h to included headers. (gen_constrs): New variable. (parse_option): Parse "-c". (main): Invoke write_tm_constrs_h. * genrecog.c (write_header): Add tm-constrs.h to included headers. * Makefile.in (STAGECOPYSTUFF): Add tm-constrs.h. (object_out_file): Add tm-constrs.h dependency. (insn-emit.o): Same. (insn-output.o): Same. (insn-peep.o): Same. (insn-preds.o): Same. (insn-recog.o): Same. (tm-constsr.h): New target. (s-constrs-h): New target. * config/rs6000/constraints.md: New file. * config/rs6000/rs6000.c: Include tm-constrs.h. (num_insn_constant_wide): Convert to satisfies_constraint. (rs6000_rtx_costs): Convert to satisfies_constraint. * config/rs6000/rs6000.h (REG_CLASS_FROM_LETTER): Delete. (CONST_OK_FOR_LETTER_P): Delete. (CONST_DOUBLE_OK_FOR_LETTER_P): Delete. (EXTRA_CONSTRAINT): Delete. (EXTRA_MEMORY_CONSTRAINT): Delete. (EXTRA_ADDRESS_CONSTRAINT): Delete. * config/rs6000/predicates.md: Convert to satisfies_constraint. * config/rs6000/rs6000.md: Include constraints.md. Convert to satisfies_constraint. * config/i386/i386.c: Include tm-constrs.h. From-SVN: r112508
2006-03-29 23:07:12 +02:00
puts ("#endif /* tm-constrs.h */");
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
}
/* Write out the wrapper function, constraint_satisfied_p, that maps
a CONSTRAINT_xxx constant to one of the predicate functions generated
above. */
static void
write_constraint_satisfied_p_array (void)
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
{
if (satisfied_start == num_constraints)
return;
printf ("bool (*constraint_satisfied_p_array[]) (rtx) = {\n ");
for (unsigned int i = satisfied_start; i < num_constraints; ++i)
{
if (i != satisfied_start)
printf (",\n ");
printf ("satisfies_constraint_%s", enum_order[i]->c_name);
}
printf ("\n};\n\n");
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
}
/* Write out the function which computes whether a given value matches
a given CONST_INT constraint. This doesn't just forward to
constraint_satisfied_p because caller passes the INTVAL, not the RTX. */
static void
write_insn_const_int_ok_for_constraint (void)
{
struct constraint_data *c;
puts ("bool\n"
"insn_const_int_ok_for_constraint (HOST_WIDE_INT ival, "
"enum constraint_num c)\n"
"{\n"
" switch (c)\n"
" {");
FOR_ALL_CONSTRAINTS (c)
if (c->is_const_int)
{
printf (" case CONSTRAINT_%s:\n return ", c->c_name);
/* c->exp is guaranteed to be (and (match_code "const_int") (...));
we know at this point that we have a const_int, so we need not
bother with that part of the test. */
write_predicate_expr (XEXP (c->exp, 1));
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
fputs (";\n\n", stdout);
}
puts (" default: break;\n"
" }\n"
" return false;\n"
"}\n");
}
/* Write a definition for a function NAME that returns true if a given
constraint_num is in the range [START, END). */
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
static void
write_range_function (const char *name, unsigned int start, unsigned int end)
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
{
printf ("static inline bool\n");
if (start != end)
printf ("%s (enum constraint_num c)\n"
"{\n"
" return c >= CONSTRAINT_%s && c <= CONSTRAINT_%s;\n"
"}\n\n",
name, enum_order[start]->c_name, enum_order[end - 1]->c_name);
else
printf ("%s (enum constraint_num)\n"
"{\n"
" return false;\n"
"}\n\n", name);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
}
/* Write a definition for insn_extra_constraint_allows_reg_mem function. */
static void
write_allows_reg_mem_function (void)
{
printf ("static inline void\n"
"insn_extra_constraint_allows_reg_mem (enum constraint_num c,\n"
"\t\t\t\t bool *allows_reg, bool *allows_mem)\n"
"{\n");
if (maybe_allows_none_start != maybe_allows_none_end)
printf (" if (c >= CONSTRAINT_%s && c <= CONSTRAINT_%s)\n"
" return;\n",
enum_order[maybe_allows_none_start]->c_name,
enum_order[maybe_allows_none_end - 1]->c_name);
if (maybe_allows_reg_start != maybe_allows_reg_end)
printf (" if (c >= CONSTRAINT_%s && c <= CONSTRAINT_%s)\n"
" {\n"
" *allows_reg = true;\n"
" return;\n"
" }\n",
enum_order[maybe_allows_reg_start]->c_name,
enum_order[maybe_allows_reg_end - 1]->c_name);
if (maybe_allows_mem_start != maybe_allows_mem_end)
printf (" if (c >= CONSTRAINT_%s && c <= CONSTRAINT_%s)\n"
" {\n"
" *allows_mem = true;\n"
" return;\n"
" }\n",
enum_order[maybe_allows_mem_start]->c_name,
enum_order[maybe_allows_mem_end - 1]->c_name);
printf (" (void) c;\n"
" *allows_reg = true;\n"
" *allows_mem = true;\n"
"}\n\n");
}
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
/* VEC is a list of key/value pairs, with the keys being lower bounds
of a range. Output a decision tree that handles the keys covered by
[VEC[START], VEC[END]), returning FALLBACK for keys lower then VEC[START]'s.
INDENT is the number of spaces to indent the code. */
static void
print_type_tree (const vec <std::pair <unsigned int, const char *> > &vec,
unsigned int start, unsigned int end, const char *fallback,
unsigned int indent)
{
while (start < end)
{
unsigned int mid = (start + end) / 2;
printf ("%*sif (c >= CONSTRAINT_%s)\n",
indent, "", enum_order[vec[mid].first]->c_name);
if (mid + 1 == end)
print_type_tree (vec, mid + 1, end, vec[mid].second, indent + 2);
else
{
printf ("%*s{\n", indent + 2, "");
print_type_tree (vec, mid + 1, end, vec[mid].second, indent + 4);
printf ("%*s}\n", indent + 2, "");
}
end = mid;
}
printf ("%*sreturn %s;\n", indent, "", fallback);
}
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
/* Write tm-preds.h. Unfortunately, it is impossible to forward-declare
an enumeration in portable C, so we have to condition all these
prototypes on HAVE_MACHINE_MODES. */
static void
write_tm_preds_h (void)
{
struct pred_data *p;
printf ("\
/* Generated automatically by the program '%s'\n\
Introduce class rtx_reader Bundle up various global variables within gensupport.c into a class rtx_reader, with a view towards making it easier to run the code more than once in-process. gcc/ChangeLog: * genconstants.c (main): Introduce noop_reader and convert call to read_md_files to a method call. * genenums.c (main): Likewise. * genmddeps.c (main): Likewise. * genpreds.c (write_tm_constrs_h): Replace use of "in_fname" with rtx_reader_ptr->get_top_level_filename (). (write_tm_preds_h): Likewise. (write_insn_preds_c): Likewise. * gensupport.c (class gen_reader): New subclass of rtx_reader. (rtx_handle_directive): Convert to... (gen_reader::handle_unknown_directive): ...this. (init_rtx_reader_args_cb): Convert return type from bool to rtx_reader *. Create a gen_reader instance, using it for the call to read_md_files. Return it if no errors occur. (init_rtx_reader_args): Convert return type from bool to rtx_reader *. * gensupport.h (init_rtx_reader_args_cb): Likewise. (init_rtx_reader_args_cb): Likewise. * read-md.c (struct file_name_list): Move to class rtx_reader. (read_md_file): Delete in favor of rtx_reader::m_read_md_file. (read_md_filename): Delete in favor of rtx_reader::m_read_md_filename. (read_md_lineno): Delete in favor of rtx_reader::m_read_md_lineno. (in_fname): Delete in favor of rtx_reader::m_toplevel_fname. (base_dir): Delete in favor of rtx_reader::m_base_dir. (first_dir_md_include): Delete in favor of rtx_reader::m_first_dir_md_include. (last_dir_md_include_ptr): Delete in favor of rtx_reader::m_last_dir_md_include_ptr. (max_include_len): Delete. (rtx_reader_ptr): New. (fatal_with_file_and_line): Use get_filename and get_lineno accessors of rtx_reader_ptr. (require_char_ws): Likewise. (rtx_reader::read_char): New method, based on ::read_char. (rtx_reader::unread_char): New method, based on ::unread_char. (read_escape): Use get_filename and get_lineno accessors of rtx_reader_ptr. (read_braced_string): Use get_lineno accessor of rtx_reader_ptr. (read_string): Use get_filename and get_lineno accessors of rtx_reader_ptr. (rtx_reader::rtx_reader): New ctor. (rtx_reader::~rtx_reader): New dtor. (handle_include): Convert from a function to... (rtx_reader::handle_include): ...this method, converting handle_directive from a callback to a virtual function. (handle_file): Likewise, converting to... (rtx_reader::handle_file): ...this method. (handle_toplevel_file): Likewise, converting to... (rtx_reader::handle_toplevel_file): ...this method. (rtx_reader::get_current_location): New method. (parse_include): Convert from a function to... (rtx_reader::add_include_path): ...this method, dropping redundant update to unused max_include_len. (read_md_files): Convert from a function to... (rtx_reader::read_md_files): ...this method, converting handle_directive from a callback to a virtual function. (noop_reader::handle_unknown_directive): New method. * read-md.h (directive_handler_t): Delete this typedef. (in_fname): Delete. (read_md_file): Delete. (read_md_lineno): Delete. (read_md_filename): Delete. (class rtx_reader): New class. (rtx_reader_ptr): New decl. (class noop_reader): New subclass of rtx_reader. (read_char): Reimplement in terms of rtx_reader::read_char. (unread_char): Reimplement in terms of rtx_reader::unread_char. (read_md_files): Delete. * read-rtl.c (read_rtx_code): Update for deletion of globals read_md_filename and read_md_lineno. From-SVN: r240333
2016-09-21 22:55:06 +02:00
from the machine description file '%s'. */\n\n", progname,
Split class rtx_reader into md_reader vs rtx_reader This moves read_rtx and friends into rtx_reader, and splits rtx_reader into two classes: class md_reader: has responsibility for reading chars, managing include files, top-level directives etc. It is the read-md.o part. class rtx_reader, a subclass, has the code for reading hierarchical rtx expressions using the format codes. It is the read-rtl.o part. This split is needed by a followup patch, which converts read_rtx_operand to a virtual function of rtx_reader. To do this, instances of rtx_reader (or its subclasses) need a vtable, which needs to include a ptr to the code in read-rtl.o. Splitting it up allows the gen* tools that currently purely use read-md.o to continue to do so. gcc/ChangeLog: * genpreds.c (write_tm_constrs_h): Update for renaming of rtx_reader_ptr to md_reader_ptr. (write_tm_preds_h): Likewise. (write_insn_preds_c): Likewise. * read-md.c (rtx_reader_ptr): Rename to... (md_reader_ptr): ...this, and convert from an rtx_reader * to a md_reader *. (rtx_reader::set_md_ptr_loc): Rename to... (md_reader::set_md_ptr_loc): ...this. (rtx_reader::get_md_ptr_loc): Rename to... (md_reader::get_md_ptr_loc): ...this. (rtx_reader::copy_md_ptr_loc): Rename to... (md_reader::copy_md_ptr_loc): ...this. (rtx_reader::fprint_md_ptr_loc): Rename to... (md_reader::fprint_md_ptr_loc): ...this. (rtx_reader::print_md_ptr_loc): Rename to... (md_reader::print_md_ptr_loc): ...this. (rtx_reader::join_c_conditions): Rename to... (md_reader::join_c_conditions): ...this. (rtx_reader::fprint_c_condition): ...this. (rtx_reader::print_c_condition): Rename to... (md_reader::print_c_condition): ...this. (fatal_with_file_and_line): Update for renaming of rtx_reader_ptr to md_reader_ptr. (rtx_reader::require_char): Rename to... (md_reader::require_char): ...this. (rtx_reader::require_char_ws): Rename to... (md_reader::require_char_ws): ...this. (rtx_reader::require_word_ws): Rename to... (md_reader::require_word_ws): ...this. (rtx_reader::read_char): Rename to... (md_reader::read_char): ...this. (rtx_reader::unread_char): Rename to... (md_reader::unread_char): ...this. (rtx_reader::peek_char): Rename to... (md_reader::peek_char): ...this. (rtx_reader::read_name): Rename to... (md_reader::read_name): ...this. (rtx_reader::read_escape): Rename to... (md_reader::read_escape): ...this. (rtx_reader::read_quoted_string): Rename to... (md_reader::read_quoted_string): ...this. (rtx_reader::read_braced_string): Rename to... (md_reader::read_braced_string): ...this. (rtx_reader::read_string): Rename to... (md_reader::read_string): ...this. (rtx_reader::read_skip_construct): Rename to... (md_reader::read_skip_construct): ...this. (rtx_reader::handle_constants): Rename to... (md_reader::handle_constants): ...this. (rtx_reader::traverse_md_constants): Rename to... (md_reader::traverse_md_constants): ...this. (rtx_reader::handle_enum): Rename to... (md_reader::handle_enum): ...this. (rtx_reader::lookup_enum_type): Rename to... (md_reader::lookup_enum_type): ...this. (rtx_reader::traverse_enum_types): Rename to... (md_reader::traverse_enum_types): ...this. (rtx_reader::rtx_reader): Rename to... (md_reader::md_reader): ...this, and update for renaming of rtx_reader_ptr to md_reader_ptr. (rtx_reader::~rtx_reader): Rename to... (md_reader::~md_reader): ...this, and update for renaming of rtx_reader_ptr to md_reader_ptr. (rtx_reader::handle_include): Rename to... (md_reader::handle_include): ...this. (rtx_reader::handle_file): Rename to... (md_reader::handle_file): ...this. (rtx_reader::handle_toplevel_file): Rename to... (md_reader::handle_toplevel_file): ...this. (rtx_reader::get_current_location): Rename to... (md_reader::get_current_location): ...this. (rtx_reader::add_include_path): Rename to... (md_reader::add_include_path): ...this. (rtx_reader::read_md_files): Rename to... (md_reader::read_md_files): ...this. * read-md.h (class rtx_reader): Split into... (class md_reader): ...new class. (rtx_reader_ptr): Rename to... (md_reader_ptr): ...this, and convert to a md_reader *. (class noop_reader): Update base class to be md_reader. (class rtx_reader): Reintroduce as a subclass of md_reader. (rtx_reader_ptr): Reintroduce as a rtx_reader *. (read_char): Update for renaming of rtx_reader_ptr to md_reader_ptr. (unread_char): Likewise. * read-rtl.c (rtx_reader_ptr): New global. (rtx_reader::apply_iterator_to_string): Rename to... (md_reader::apply_iterator_to_string): ...this. (rtx_reader::copy_rtx_for_iterators): Rename to... (md_reader::copy_rtx_for_iterators): ...this. (rtx_reader::read_conditions): Rename to... (md_reader::read_conditions): ...this. (rtx_reader::record_potential_iterator_use): Rename to... (md_reader::record_potential_iterator_use): ...this. (rtx_reader::read_mapping): Rename to... (md_reader::read_mapping): ...this. (rtx_reader::read_rtx): Use rtx_reader_ptr when calling read_rtx_code. (rtx_reader::read_rtx_operand): Use get_string_obstack rather than directly accessing m_string_obstack. (rtx_reader::rtx_reader): New ctor. (rtx_reader::~rtx_reader): New dtor. From-SVN: r243426
2016-12-08 02:51:04 +01:00
md_reader_ptr->get_top_level_filename ());
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
puts ("\
#ifndef GCC_TM_PREDS_H\n\
#define GCC_TM_PREDS_H\n\
\n\
#ifdef HAVE_MACHINE_MODES");
FOR_ALL_PREDICATES (p)
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
printf ("extern int %s (rtx, machine_mode);\n", p->name);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
puts ("#endif /* HAVE_MACHINE_MODES */\n");
if (constraint_max_namelen > 0)
{
write_enum_constraint_num ();
puts ("extern enum constraint_num lookup_constraint_1 (const char *);\n"
"extern const unsigned char lookup_constraint_array[];\n"
"\n"
"/* Return the constraint at the beginning of P, or"
" CONSTRAINT__UNKNOWN if it\n"
" isn't recognized. */\n"
"\n"
"static inline enum constraint_num\n"
"lookup_constraint (const char *p)\n"
"{\n"
" unsigned int index = lookup_constraint_array"
"[(unsigned char) *p];\n"
" return (index == UCHAR_MAX\n"
" ? lookup_constraint_1 (p)\n"
" : (enum constraint_num) index);\n"
"}\n");
if (satisfied_start == num_constraints)
puts ("/* Return true if X satisfies constraint C. */\n"
"\n"
"static inline bool\n"
"constraint_satisfied_p (rtx, enum constraint_num)\n"
"{\n"
" return false;\n"
"}\n");
else
printf ("extern bool (*constraint_satisfied_p_array[]) (rtx);\n"
"\n"
"/* Return true if X satisfies constraint C. */\n"
"\n"
"static inline bool\n"
"constraint_satisfied_p (rtx x, enum constraint_num c)\n"
"{\n"
" int i = (int) c - (int) CONSTRAINT_%s;\n"
" return i >= 0 && constraint_satisfied_p_array[i] (x);\n"
"}\n"
"\n",
enum_order[satisfied_start]->name);
write_range_function ("insn_extra_register_constraint",
register_start, register_end);
write_range_function ("insn_extra_memory_constraint",
memory_start, memory_end);
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
write_range_function ("insn_extra_special_memory_constraint",
special_memory_start, special_memory_end);
write_range_function ("insn_extra_address_constraint",
address_start, address_end);
write_allows_reg_mem_function ();
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
if (constraint_max_namelen > 1)
{
write_insn_constraint_len ();
puts ("#define CONSTRAINT_LEN(c_,s_) "
"insn_constraint_len (c_,s_)\n");
}
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
else
puts ("#define CONSTRAINT_LEN(c_,s_) 1\n");
if (have_register_constraints)
puts ("extern enum reg_class reg_class_for_constraint_1 "
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
"(enum constraint_num);\n"
"\n"
"static inline enum reg_class\n"
"reg_class_for_constraint (enum constraint_num c)\n"
"{\n"
" if (insn_extra_register_constraint (c))\n"
" return reg_class_for_constraint_1 (c);\n"
" return NO_REGS;\n"
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
"}\n");
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
else
puts ("static inline enum reg_class\n"
"reg_class_for_constraint (enum constraint_num)\n"
"{\n"
" return NO_REGS;\n"
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
"}\n");
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
if (have_const_int_constraints)
puts ("extern bool insn_const_int_ok_for_constraint "
"(HOST_WIDE_INT, enum constraint_num);\n"
"#define CONST_OK_FOR_CONSTRAINT_P(v_,c_,s_) \\\n"
" insn_const_int_ok_for_constraint (v_, "
"lookup_constraint (s_))\n");
else
puts ("static inline bool\n"
"insn_const_int_ok_for_constraint (HOST_WIDE_INT,"
" enum constraint_num)\n"
"{\n"
" return false;\n"
"}\n");
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
puts ("enum constraint_type\n"
"{\n"
" CT_REGISTER,\n"
" CT_CONST_INT,\n"
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
" CT_MEMORY,\n"
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
" CT_SPECIAL_MEMORY,\n"
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
" CT_ADDRESS,\n"
" CT_FIXED_FORM\n"
"};\n"
"\n"
"static inline enum constraint_type\n"
"get_constraint_type (enum constraint_num c)\n"
"{");
auto_vec <std::pair <unsigned int, const char *>, 4> values;
if (const_int_start != const_int_end)
values.safe_push (std::make_pair (const_int_start, "CT_CONST_INT"));
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
if (memory_start != memory_end)
values.safe_push (std::make_pair (memory_start, "CT_MEMORY"));
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
if (special_memory_start != special_memory_end)
values.safe_push (std::make_pair (special_memory_start, "CT_SPECIAL_MEMORY"));
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
if (address_start != address_end)
values.safe_push (std::make_pair (address_start, "CT_ADDRESS"));
if (address_end != num_constraints)
values.safe_push (std::make_pair (address_end, "CT_FIXED_FORM"));
print_type_tree (values, 0, values.length (), "CT_REGISTER", 2);
puts ("}");
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
}
puts ("#endif /* tm-preds.h */");
}
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
/* Write insn-preds.c.
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
N.B. the list of headers to include was copied from genrecog; it
may not be ideal.
FUTURE: Write #line markers referring back to the machine
description. (Can't practically do this now since we don't know
the line number of the C block - just the line number of the enclosing
expression.) */
static void
write_insn_preds_c (void)
{
struct pred_data *p;
printf ("\
/* Generated automatically by the program '%s'\n\
Introduce class rtx_reader Bundle up various global variables within gensupport.c into a class rtx_reader, with a view towards making it easier to run the code more than once in-process. gcc/ChangeLog: * genconstants.c (main): Introduce noop_reader and convert call to read_md_files to a method call. * genenums.c (main): Likewise. * genmddeps.c (main): Likewise. * genpreds.c (write_tm_constrs_h): Replace use of "in_fname" with rtx_reader_ptr->get_top_level_filename (). (write_tm_preds_h): Likewise. (write_insn_preds_c): Likewise. * gensupport.c (class gen_reader): New subclass of rtx_reader. (rtx_handle_directive): Convert to... (gen_reader::handle_unknown_directive): ...this. (init_rtx_reader_args_cb): Convert return type from bool to rtx_reader *. Create a gen_reader instance, using it for the call to read_md_files. Return it if no errors occur. (init_rtx_reader_args): Convert return type from bool to rtx_reader *. * gensupport.h (init_rtx_reader_args_cb): Likewise. (init_rtx_reader_args_cb): Likewise. * read-md.c (struct file_name_list): Move to class rtx_reader. (read_md_file): Delete in favor of rtx_reader::m_read_md_file. (read_md_filename): Delete in favor of rtx_reader::m_read_md_filename. (read_md_lineno): Delete in favor of rtx_reader::m_read_md_lineno. (in_fname): Delete in favor of rtx_reader::m_toplevel_fname. (base_dir): Delete in favor of rtx_reader::m_base_dir. (first_dir_md_include): Delete in favor of rtx_reader::m_first_dir_md_include. (last_dir_md_include_ptr): Delete in favor of rtx_reader::m_last_dir_md_include_ptr. (max_include_len): Delete. (rtx_reader_ptr): New. (fatal_with_file_and_line): Use get_filename and get_lineno accessors of rtx_reader_ptr. (require_char_ws): Likewise. (rtx_reader::read_char): New method, based on ::read_char. (rtx_reader::unread_char): New method, based on ::unread_char. (read_escape): Use get_filename and get_lineno accessors of rtx_reader_ptr. (read_braced_string): Use get_lineno accessor of rtx_reader_ptr. (read_string): Use get_filename and get_lineno accessors of rtx_reader_ptr. (rtx_reader::rtx_reader): New ctor. (rtx_reader::~rtx_reader): New dtor. (handle_include): Convert from a function to... (rtx_reader::handle_include): ...this method, converting handle_directive from a callback to a virtual function. (handle_file): Likewise, converting to... (rtx_reader::handle_file): ...this method. (handle_toplevel_file): Likewise, converting to... (rtx_reader::handle_toplevel_file): ...this method. (rtx_reader::get_current_location): New method. (parse_include): Convert from a function to... (rtx_reader::add_include_path): ...this method, dropping redundant update to unused max_include_len. (read_md_files): Convert from a function to... (rtx_reader::read_md_files): ...this method, converting handle_directive from a callback to a virtual function. (noop_reader::handle_unknown_directive): New method. * read-md.h (directive_handler_t): Delete this typedef. (in_fname): Delete. (read_md_file): Delete. (read_md_lineno): Delete. (read_md_filename): Delete. (class rtx_reader): New class. (rtx_reader_ptr): New decl. (class noop_reader): New subclass of rtx_reader. (read_char): Reimplement in terms of rtx_reader::read_char. (unread_char): Reimplement in terms of rtx_reader::unread_char. (read_md_files): Delete. * read-rtl.c (read_rtx_code): Update for deletion of globals read_md_filename and read_md_lineno. From-SVN: r240333
2016-09-21 22:55:06 +02:00
from the machine description file '%s'. */\n\n", progname,
Split class rtx_reader into md_reader vs rtx_reader This moves read_rtx and friends into rtx_reader, and splits rtx_reader into two classes: class md_reader: has responsibility for reading chars, managing include files, top-level directives etc. It is the read-md.o part. class rtx_reader, a subclass, has the code for reading hierarchical rtx expressions using the format codes. It is the read-rtl.o part. This split is needed by a followup patch, which converts read_rtx_operand to a virtual function of rtx_reader. To do this, instances of rtx_reader (or its subclasses) need a vtable, which needs to include a ptr to the code in read-rtl.o. Splitting it up allows the gen* tools that currently purely use read-md.o to continue to do so. gcc/ChangeLog: * genpreds.c (write_tm_constrs_h): Update for renaming of rtx_reader_ptr to md_reader_ptr. (write_tm_preds_h): Likewise. (write_insn_preds_c): Likewise. * read-md.c (rtx_reader_ptr): Rename to... (md_reader_ptr): ...this, and convert from an rtx_reader * to a md_reader *. (rtx_reader::set_md_ptr_loc): Rename to... (md_reader::set_md_ptr_loc): ...this. (rtx_reader::get_md_ptr_loc): Rename to... (md_reader::get_md_ptr_loc): ...this. (rtx_reader::copy_md_ptr_loc): Rename to... (md_reader::copy_md_ptr_loc): ...this. (rtx_reader::fprint_md_ptr_loc): Rename to... (md_reader::fprint_md_ptr_loc): ...this. (rtx_reader::print_md_ptr_loc): Rename to... (md_reader::print_md_ptr_loc): ...this. (rtx_reader::join_c_conditions): Rename to... (md_reader::join_c_conditions): ...this. (rtx_reader::fprint_c_condition): ...this. (rtx_reader::print_c_condition): Rename to... (md_reader::print_c_condition): ...this. (fatal_with_file_and_line): Update for renaming of rtx_reader_ptr to md_reader_ptr. (rtx_reader::require_char): Rename to... (md_reader::require_char): ...this. (rtx_reader::require_char_ws): Rename to... (md_reader::require_char_ws): ...this. (rtx_reader::require_word_ws): Rename to... (md_reader::require_word_ws): ...this. (rtx_reader::read_char): Rename to... (md_reader::read_char): ...this. (rtx_reader::unread_char): Rename to... (md_reader::unread_char): ...this. (rtx_reader::peek_char): Rename to... (md_reader::peek_char): ...this. (rtx_reader::read_name): Rename to... (md_reader::read_name): ...this. (rtx_reader::read_escape): Rename to... (md_reader::read_escape): ...this. (rtx_reader::read_quoted_string): Rename to... (md_reader::read_quoted_string): ...this. (rtx_reader::read_braced_string): Rename to... (md_reader::read_braced_string): ...this. (rtx_reader::read_string): Rename to... (md_reader::read_string): ...this. (rtx_reader::read_skip_construct): Rename to... (md_reader::read_skip_construct): ...this. (rtx_reader::handle_constants): Rename to... (md_reader::handle_constants): ...this. (rtx_reader::traverse_md_constants): Rename to... (md_reader::traverse_md_constants): ...this. (rtx_reader::handle_enum): Rename to... (md_reader::handle_enum): ...this. (rtx_reader::lookup_enum_type): Rename to... (md_reader::lookup_enum_type): ...this. (rtx_reader::traverse_enum_types): Rename to... (md_reader::traverse_enum_types): ...this. (rtx_reader::rtx_reader): Rename to... (md_reader::md_reader): ...this, and update for renaming of rtx_reader_ptr to md_reader_ptr. (rtx_reader::~rtx_reader): Rename to... (md_reader::~md_reader): ...this, and update for renaming of rtx_reader_ptr to md_reader_ptr. (rtx_reader::handle_include): Rename to... (md_reader::handle_include): ...this. (rtx_reader::handle_file): Rename to... (md_reader::handle_file): ...this. (rtx_reader::handle_toplevel_file): Rename to... (md_reader::handle_toplevel_file): ...this. (rtx_reader::get_current_location): Rename to... (md_reader::get_current_location): ...this. (rtx_reader::add_include_path): Rename to... (md_reader::add_include_path): ...this. (rtx_reader::read_md_files): Rename to... (md_reader::read_md_files): ...this. * read-md.h (class rtx_reader): Split into... (class md_reader): ...new class. (rtx_reader_ptr): Rename to... (md_reader_ptr): ...this, and convert to a md_reader *. (class noop_reader): Update base class to be md_reader. (class rtx_reader): Reintroduce as a subclass of md_reader. (rtx_reader_ptr): Reintroduce as a rtx_reader *. (read_char): Update for renaming of rtx_reader_ptr to md_reader_ptr. (unread_char): Likewise. * read-rtl.c (rtx_reader_ptr): New global. (rtx_reader::apply_iterator_to_string): Rename to... (md_reader::apply_iterator_to_string): ...this. (rtx_reader::copy_rtx_for_iterators): Rename to... (md_reader::copy_rtx_for_iterators): ...this. (rtx_reader::read_conditions): Rename to... (md_reader::read_conditions): ...this. (rtx_reader::record_potential_iterator_use): Rename to... (md_reader::record_potential_iterator_use): ...this. (rtx_reader::read_mapping): Rename to... (md_reader::read_mapping): ...this. (rtx_reader::read_rtx): Use rtx_reader_ptr when calling read_rtx_code. (rtx_reader::read_rtx_operand): Use get_string_obstack rather than directly accessing m_string_obstack. (rtx_reader::rtx_reader): New ctor. (rtx_reader::~rtx_reader): New dtor. From-SVN: r243426
2016-12-08 02:51:04 +01:00
md_reader_ptr->get_top_level_filename ());
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
puts ("\
#include \"config.h\"\n\
#include \"system.h\"\n\
#include \"coretypes.h\"\n\
tree-core.h: Include symtab.h. 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * tree-core.h: Include symtab.h. * rtl.h: Include hard-reg-set.h but not flags.h. (HARD_CONST): Remove condition compilation involving HARD_CONST since hard-reg-set.h is always included. * regs.h: Don't include hard-reg-set.h or rtl.h. * cfg.h: Include dominance.h. * gimple.h: Include tree-ssa-alias.h and gimple-expr.h. * backend.h: New. Aggregate commonly used backend header files. * gimple-ssa.h: Don't include tree-hasher.h. * ssa.h: New. Aggregate commonly used SSA header files. * regset.h: Remove bitmap.h and hard-reg-set.h #includes. * sel-sched-ir.h: Flatten includes. * lra-int.h: Flatten completely. * sel-sched-dump.h: Flatten includes. * ira-int.h: Flatten includes. * gimple-streamer.h: Remove all includes. * cfgloop.h: Remove all #includes except cfgloopmanip.h. * resource.h: Flatten hard-reg-set.h and df.h. * sched-int.h: Flatten insn-arrt.h and df.h. * valtrack.h: flatten bitmap.h, df.h, and rtl.h * df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h. * genattrtab.c (write_header): Adjust generated includes. * genautomata.c (main): Likewise. * genconditions.c (write-header): Likewise. * genemit.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * alias.c: Adjust includes. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse-common.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * valtrack.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/aarch64/cortex-a57-fma-steering.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/aarch-common.c: Likewise. * config/arm/arm-builtins.c: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-c.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386-c.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze-c.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430-c.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78-c.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390-c.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh-c.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sol2-c.c: Likewise. * config/sol2-cxx.c: Likewise. * config/sol2-stubs.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc-c.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu-c.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/mul-tables.c: Likewise. * config/tilegx/tilegx-c.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/mul-tables.c: Likewise. * config/tilepro/tilepro-c.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/vms/vms-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. ada 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c: Adjust includes. * gcc-interface/decl.c: Likewise. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. c 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c: Adjust includes. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. c-family 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c: Adjust includes. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * call.c: Adjust includes. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. fortran 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * convert.c: Adjust includes. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * go-backend.c: Adjust includes. * go-gcc.cc: Likewise. * go-lang.c: Likewise. java 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Adjust includes. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. jit 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Adjust includes. * jit-common.h: Likewise. * jit-playback.c: Likewise. lto 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Adjust includes. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objc-act.c: Adjust includes. * objc-encoding.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-lang.c: Likewise. * objc-map.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. objcp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c: Adjust includes. * objcp-lang.c: Likewise. From-SVN: r225531
2015-07-08 02:53:03 +02:00
#include \"backend.h\"\n\
gimple-predict.h: New file. 2015-07-10 Andrew MacLeod <amacleod@redhat.com> * gimple-predict.h: New file. (gimple_predict_predictor, gimple_predict_set_predictor, gimple_predict_outcome, gimple_predict_set_outcome, gimple_build_predict): Relocate here. * gimple.h (gimple_predict_predictor, gimple_predict_set_predictor, gimple_predict_outcome, gimple_predict_set_outcome): Move to gimple-predict.h. * gimple.c (gimple_build_predict): Move to gimple-predict.h * basic-block.h: Don't include cfghooks.h. * backend.h: Don't include predict.h. * cfghooks.h: Include predict.h. * gimple-pretty-print.c: Include gimple-predict.h. * gimplify.c: Likwise. * predict.c: Adjust includes. * tree-inline.c: Likewise. * asan.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfg.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloopanal.c: Likewise. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * dce.c: Likewise. * dojump.c: Likewise. * dse.c: Likewise. * except.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * genemit.c: Likewise. * gengtype.c: Likewise. * genopinit.c: Likewise. * genoutput.c: Likewise. * genpreds.c: Likewise. * genrecog.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * internal-fn.c: Likewise. * ipa-cp.c: Likewise. * ipa-profile.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * jump.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-lives.c: Likewise. * lto-cgraph.c: Likewise. * lto-streamer-in.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * passes.c: Likewise. * postreload.c: Likewise. * postreload-gcse.c: Likewise. * profile.c: Likewise. * recog.c: Likewise. * regstat.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * rtlanal.c: Likewise. * sched-ebb.c: Likewise. * sel-sched-ir.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stmt.c: Likewise. * store-motion.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp.c: Likewise. * tree-complex.c: Likewise. * tree-eh.c: Likewise. * tree-if-conv.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-sra.c: Likewise. * tree-ssa.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * varasm.c: Likewise. * var-tracking.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/aarch64/cortex-a57-fma-steering.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin.c: Likewise. * config/darwin-c.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/xtensa/xtensa.c: Likewise. java 2015-07-10 Andrew MacLeod <amacleod@redhat.com> * java-gimplify.c: Include cfghooks.h rather than predict.h. lto 2015-07-10 Andrew MacLeod <amacleod@redhat.com> * lto.c: Include cfghooks.h rather than predict.h. From-SVN: r225668
2015-07-10 14:13:06 +02:00
#include \"predict.h\"\n\
tree-core.h: Include symtab.h. 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * tree-core.h: Include symtab.h. * rtl.h: Include hard-reg-set.h but not flags.h. (HARD_CONST): Remove condition compilation involving HARD_CONST since hard-reg-set.h is always included. * regs.h: Don't include hard-reg-set.h or rtl.h. * cfg.h: Include dominance.h. * gimple.h: Include tree-ssa-alias.h and gimple-expr.h. * backend.h: New. Aggregate commonly used backend header files. * gimple-ssa.h: Don't include tree-hasher.h. * ssa.h: New. Aggregate commonly used SSA header files. * regset.h: Remove bitmap.h and hard-reg-set.h #includes. * sel-sched-ir.h: Flatten includes. * lra-int.h: Flatten completely. * sel-sched-dump.h: Flatten includes. * ira-int.h: Flatten includes. * gimple-streamer.h: Remove all includes. * cfgloop.h: Remove all #includes except cfgloopmanip.h. * resource.h: Flatten hard-reg-set.h and df.h. * sched-int.h: Flatten insn-arrt.h and df.h. * valtrack.h: flatten bitmap.h, df.h, and rtl.h * df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h. * genattrtab.c (write_header): Adjust generated includes. * genautomata.c (main): Likewise. * genconditions.c (write-header): Likewise. * genemit.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * alias.c: Adjust includes. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse-common.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * valtrack.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/aarch64/cortex-a57-fma-steering.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/aarch-common.c: Likewise. * config/arm/arm-builtins.c: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-c.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386-c.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze-c.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430-c.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78-c.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390-c.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh-c.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sol2-c.c: Likewise. * config/sol2-cxx.c: Likewise. * config/sol2-stubs.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc-c.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu-c.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/mul-tables.c: Likewise. * config/tilegx/tilegx-c.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/mul-tables.c: Likewise. * config/tilepro/tilepro-c.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/vms/vms-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. ada 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c: Adjust includes. * gcc-interface/decl.c: Likewise. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. c 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c: Adjust includes. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. c-family 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c: Adjust includes. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * call.c: Adjust includes. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. fortran 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * convert.c: Adjust includes. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * go-backend.c: Adjust includes. * go-gcc.cc: Likewise. * go-lang.c: Likewise. java 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Adjust includes. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. jit 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Adjust includes. * jit-common.h: Likewise. * jit-playback.c: Likewise. lto 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Adjust includes. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objc-act.c: Adjust includes. * objc-encoding.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-lang.c: Likewise. * objc-map.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. objcp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c: Adjust includes. * objcp-lang.c: Likewise. From-SVN: r225531
2015-07-08 02:53:03 +02:00
#include \"tree.h\"\n\
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
#include \"rtl.h\"\n\
genattrtab.c (write_header): Include hash-set.h... 2015-01-09 Michael Collison <michael.collison@linaro.org> * genattrtab.c (write_header): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-attrtab.c. * genautomata.c (main) : Include hash-set.h, macInclude hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-automata.c. * genemit.c (main): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-emit.c. * gengtype.c (open_base_files): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating gtype-desc.c. * genopinit.c (main): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-opinit.c. * genoutput.c (output_prologue): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-output.c. * genpeep.c (main): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-peep.c. * genpreds.c (write_insn_preds_c): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-preds.c. * optc-save-gen-awk: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating options-save.c. * opth-gen.awk: Change include guard from GCC_C_COMMON_H to GCC_C_COMMON_C when generating options.h. * ada/gcc-interface/cuintp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ada/gcc-interface/decl.c: ditto. * ada/gcc-interface/misc.c: ditto. * ada/gcc-interface/targtyps.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ada/gcc-interface/trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, real.h, fold-const.h, wide-int.h, inchash.h due to flattening of tree.h. * ada/gcc-interface/utils.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ada/gcc-interface/utils2.c: ditto. * alias.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * asan.c: ditto. * attribs.c: ditto. * auto-inc-dec.c: ditto. * auto-profile.c: ditto * bb-reorder.c: ditto. * bt-load.c: Include symtab.h due to flattening of tree.h. * builtins.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c/c-array-notation.c: ditto. * c/c-aux-info.c: ditto. * c/c-convert.c: ditto. * c/c-decl.c: ditto. * c/c-errors.c: ditto. * c/c-lang.c: dittoxs. * c/c-objc-common.c: ditto. * c/c-parser.c: ditto. * c/c-typeck.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * calls.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ccmp.c: ditto. * c-family/array-notation-common.c: ditto. * c-family/c-ada-spec.c: ditto. * c-family/c-cilkplus.c: ditto. * c-family/c-common.c: Include input.h due to flattening of tree.h. Define macro GCC_C_COMMON_C. * c-family/c-common.h: Flatten tree.h header files into c-common.h. Remove include of tree-core.h. * c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/c-dump.c: ditto. * c-family/c-format.c: Flatten tree.h header files into c-common.h. * c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/c-dump.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/c-format.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * c-family/c-gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/cilk.c: ditto. * c-family/c-lex.c: ditto. * c-family/c-omp.c: ditto. * c-family/c-opts.c: ditto. * c-family/c-pch.c: ditto. * c-family/c-ppoutput.c: ditto. * c-family/c-pragma.c: ditto. * c-family/c-pretty-print.c: ditto. * c-family/c-semantics.c: ditto. * c-family/c-ubsan.c: ditto. * c-family/stub-objc.c: ditto. * cfgbuild.c: ditto. * cfg.c: ditto. * cfgcleanup.c: ditto. * cfgexpand.c: ditto. * cfghooks.c: ditto. * cfgloop.c: Include symtab.h, fold-const.h, and inchash.h due to flattening of tree.h. * cfgloopmanip.c: ditto. * cfgrtl.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * cgraphbuild.c: ditto. * cgraph.c: ditto. * cgraphclones.c: ditto. * cgraphunit.c: ditto. * cilk-common.c: ditto. * combine.c: ditto. * combine-stack-adj.c: Include symbol.h due to flattening of tree.h. * config/aarch64/aarch64-builtins.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/aarch64/aarch64.c: ditto. * config/alpha/alpha.c: ditto. * config/arc/arc.c: ditto. * config/arm/aarch-common.c: ditto. * config/arm/arm-builtins.c: ditto. * config/arm/arm.c: ditto. * config/arm/arm-c.c: ditto. * config/avr/avr.c: ditto. * config/avr/avr-c.c: ditto. * config/avr/avr-log.c: ditto. * config/bfin/bfin.c: ditto. * config/c6x/c6x.c: ditto. * config/cr16/cr16.c: ditto. * config/cris/cris.c: ditto. * config/darwin.c: ditto. * config/darwin-c.c: ditto. * config/default-c.c: ditto. * config/epiphany/epiphany.c: ditto. * config/fr30/fr30.c: ditto. * config/frv/frv.c: ditto. * config/glibc-c.c: ditto. * config/h8300/h8300.c: ditto. * config/i386/i386.c: ditto. * config/i386/i386-c.c: ditto. * config/i386/msformat.c: ditto. * config/i386/winnt.c: ditto. * config/i386/winnt-cxx.c: ditto. * config/i386/winnt-stubs.c: ditto. * config/ia64/ia64.c: ditto. * config/ia64/ia64-c.c: ditto. * config/iq2000/iq2000.c: ditto. * config/lm32/lm32.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/m32c/m32c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/m32c/m32c-pragma.c: ditto. * config/m32c/m32cr.c: ditto. * config/m68/m68k.c: ditto. * config/mcore/mcore.c: ditto. * config/mep/mep.c: ditto. * config/mep/mep-pragma.c: ditto. * config/microblaze/microblaze.c: ditto. * config/microblaze/microblaze-c.c: ditto. * config/mips/mips.c: ditto. * config/mmix/mmix.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/mn10300/mn10300.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/moxie/moxie.c: ditto. * config/msp430/msp430.c: ditto. * config/msp430/msp430-c.c: ditto. * config/nds32/nds32.c: ditto. * config/nds32/nds32-cost.c: ditto. * config/nds32/nds32-fp-as-gp.c: ditto. * config/nds32/nds32-intrinsic.c: ditto. * config/nds32/nds32-isr.c: ditto. * config/nds32/nds32-md-auxillary.c: ditto. * config/nds32/nds32-memory-manipulationx.c: ditto. * config/nds32/nds32-pipelines-auxillary.c: ditto. * config/nds32/nds32-predicates.c: ditto. * config/nios2/nios2.c: ditto. * config/nvptx/nvptx.c: ditto. * config/pa/pa.c: ditto. * config/pdp11/pdp11x.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/rl78/rl78.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/rl78/rl78-cx.c: ditto. * config/rs6000/rs6000.c: ditto. * config/rs6000/rs6000-c.c: ditto. * config/rx/rx.c: ditto. * config/s390/s390.c: ditto. * config/sh/sh.c: ditto. * config/sh/sc.c: ditto. * config/sh/sh-mem.cc: ditto. * config/sh/sh_treg_combine.cc: Include symtab.h, inchash.h and tree.h due to flattening of tree.h. Remove include of tree-core.h. * config/sol2.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/sol2-c.c: ditto. * config/sol2-cxx.c: ditto. * config/sol2-stubs.c: ditto. * config/sparc/sparc.c: ditto. * config/sparc/sparc-cx.c: ditto. * config/spu/spu.c: ditto. * config/spu/spu-c.c: ditto * config/storym16/stormy16.c: ditto. * config/tilegx/tilegx.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/tilepro/gen-mul-tables.cc: Include symtab.h in generated file. * config/tilegx/tilegx-c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/tilepro/tilepro.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/tilepro/tilepro-c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/v850/v850.c: ditto. * config/v850/v850-c.c: ditto. * config/vax/vax.c: ditto. * config/vms/vms.c: ditto. * config/vms/vms-c.c: ditto. * config/vxworks.c: ditto. * config/winnt-c.c: ditto. * config/xtensa/xtensa.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * coverage.c: ditto. * cp/call.c: ditto. * cp/class.c: ditto. * cp/constexpr.c: ditto. * cp/cp-array-notation.c: ditto. * cp/cp-gimplify.c: ditto. * cp/cp-lang.c: ditto. * cp/cp-objcp-common.c: ditto. * cp/cvt.c: ditto. * cp/decl2.c: ditto. * cp/decl.c: ditto. * cp/dump.c: ditto. * cp/error.c: ditto. * cp/except.c: ditto. * cp/expr.c: ditto. * cp/friend.c: ditto. * cp/init.c: ditto. * cp/lambda.c: ditto. * cp/lex.c: ditto. * cp/mangle.c: ditto. * cp/name-lookup.c: ditto. * cp/optimize.c: ditto. * cp/parser.c: ditto. * cp/pt.c: ditto. * cp/ptree.c: ditto. * cp/repo.c: ditto. * cp/rtti.c: ditto. * cp/search.c: ditto. * cp/semantics.c: ditto. * cp/tree.c: ditto. * cp/typeck2.c: ditto. * cp/typeck.c: ditto. * cppbuiltin.c: ditto. * cprop.c: ditto. * cse.c: Add include of symtab.h due to flattening of tree.h. * cselib.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * data-streamer.c: ditto. * data-streamer-in.c: ditto. * data-streamer-out.c: ditto. * dbxout.c: ditto. * dce.c: ditto. * ddg.c: Add include of symtab.h due to flattening of tree.h. * debug.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * dfp.c: ditto. * df-scan.c: ditto. * dojump.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * double-int.c: ditto. * dse.c: ditto. * dumpfile.c: ditto. * dwarf2asm.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * dwarf2cfi.c: ditto. * dwarf2out.c: ditto. * emit-rtl.c: ditto. * except.c: ditto. * explow.c: ditto. * expmed.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * expr.c: ditto. * final.c: ditto. * fixed-value.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and fixed-value.h due to flattening of tree.h. * fold-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. Relocate inline function convert_to_ptrofftype_loc from tree.h. Relocate inline function fold_build_pointer_plus_loc from tree.h. Relocate inline function fold_build_pointer_plus_hwi_loc from tree.h. * fold-const.h: Relocate macro convert_to_ptrofftype from tree.h. Relocate macro fold_build_pointer_plus to relocate from tree.h.h. Relocate macro fold_build_pointer_plus_hwi from tree.h. Add prototype for convert_to_ptrofftype_loc relocated from tree.h. Add prototype for fold_build_pointer_plus_loc relocated from tree.h. Add prototype for fold_build_pointer_plus_hwi_loc relocated from tree.h. * fortran/convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/decl.c: ditto. * fortran/f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/iresolve.c: ditto. * fortran/match.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/module.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/options.c: ditto. * fortran/target-memory.c: Include hash-set.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-const.c: ditto. * fortran/trans-decl.c: ditto. * fortran/trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * fortran/trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-openmp.c: ditto. * fortran/trans-stmt.c: ditto. * fortran/trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * function.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gcc-plugin.h: Include statistics.h, double-int.h, real.h, fixed-value.h, alias.h, flags.h, and symtab.h due to flattening of tree.h * gcse.c: ditto. * generic-match-head.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ggc-page.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimple-builder.c: ditto. * gimple.c: ditto. * gimple-expr.c: ditto. * gimple-fold.c: ditto. * gimple-iterator.c: ditto. * gimple-low.c: ditto. * gimple-match-head.c: ditto. * gimple-pretty-print.c: ditto. * generic-ssa-isolate-paths.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimple-ssa-strength-reduction.c: ditto. * gimple-streamer-in.c: ditto. * gimple-streamer-out.c: ditto. * gimple-walk.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimplify-me.c: ditto. * go/go-gcc.cc: ditto. * go/go-lang.c: ditto. * go/gdump.c: ditto. * graphite-blocking.c: ditto. * graphite.c: ditto. * graphite-dependencies.c: ditto. * graphite-interchange.c: ditto. * graphite-isl-ast-to-gimple.c: ditto. * graphite-optimize-isl.c: ditto. * graphite-poly.c: ditto. * graphite-scop-detection.c: ditto. * graphite-sese-to-poly.c: ditto. * hw-doloop.c: Include symtab.h due to flattening of tree.h. * ifcvt.c: ditto. * init-regs.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * internal-fc.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h,options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa.c: ditto. * ipa-chkp.c: ditto. * ipa-comdats.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-cp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h,options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-devirt.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-icf.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h,options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-icf-gimple.c: ditto. * ipa-inline-analysis.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-inline.c: ditto. * ipa-inline-transform.c: ditto. * ipa-polymorhpic-call.c: ditto. * ipa-profile.c: ditto. * ipa-prop.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-pure-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-reference.c: ditto. * ipa-split.c: ditto. * ipa-utils.c: ditto. * ipa-visbility.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ira.c: ditto. * ira-color.c: Include hash-set.h due to flattening of tree.h. * ira-costs.c: ditto. * ira-emit.c: ditto. * java/boehm.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/builtins.c: ditto. * java/class.c: ditto. * java/constants.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/decl.c: ditto. * java/except.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h,inchash.h and real.h due to flattening of tree.h. * java/gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/jcf-dump.c: ditto. * java/jcf-io.c: ditto. * java/jcf-parse.c: ditto. * java/jvgenmain.c: ditto. * java/lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/mangle.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/mangle_name.c: ditto. * java/resource.c: ditto. * java/typeck.c: ditto. * java/verify-glue.c: ditto. * java/verify-impl.c: ditto. * jump.c: Include symtab.h due to flattening of tree.h. * langhooks.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * loop-doloop.c: Include symtab.h due to flattening of tree.h. * loop-init.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * loop-invariant.c: Include symtab.h due to flattening of tree.h. * loop-iv.c: ditto. * loop-unroll.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lower-subreg.c: ditto. * lra-assigns.c: Include symtab.h due to flattening of tree.h. * lra.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * lra-coalesce.c: Include symtab.h due to flattening of tree.h. * lra-constraints.c: ditto. * lra-eliminations.c: ditto. * lra-livesc: ditto. * lra-remat.c: ditto. * lra-spills.c: ditto. * lto/lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto/lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto/lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto/lto-partition.c: ditto. * lto/lto-symtab.c: ditto. * lto-cgraph.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto-compress.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto-opts.c: ditto. * lto-section-in.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto-section-out.c: ditto. * lto-streamer.c: ditto. * lto-streamer-in.c: ditto. * lto-streamer-out.c: ditto. * modulo-sched.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * objc/objc-act.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * objc/objc-encoding.c: ditto. * objc/objc-gnu-runtime-abi-01.c: ditto. * objc/objc-lang.c: ditto. * objc/objc-map.c: ditto. * objc/objc-next-runtime-abi-01.c: ditto. * objc/objc-next-runtime-abi-02.c: ditto. * objc/objc-runtime-shared-support.c: ditto. * objcp/objcp-decl.c: ditto. * objcp/objcp-lang.c: ditto. * omega.c: ditto. * omega-low.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * optabs.c: ditto. * opts-global.c: ditto. * passes.c: ditto. * plugin.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * postreload.c: Include symtab.h due to flattening of tree.h. * postreload-gcse.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * predict.c: ditto. * print-rtl.c: ditto. * print-tree.c: ditto. * profile.c: Include symtab.h, fold-const.h and inchash.h due to flattening of tree.h. * real.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * realmpfr.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * recog.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ree.c: ditto. * reginfo.c: ditto. * reg-stack.c: ditto. * reload1.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * reload.c: Include symtab.h due to flattening of tree.h. * reorg.c: ditto. * rtlanal.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * rtl-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * rtlhooks.c: Include symtab.h due to flattening of tree.h. * sanopt.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * sched-deps.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * sched-vis.c: ditto. * sdbout.c: ditto. * sel-sched.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * sel-sched-ir.c: ditto. * sese.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * shrink-wrap.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * simplify-rtx.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * stack-ptr-mod.c: ditto. * stmt.c: ditto. * store-motion.c: ditto. * store-layout.c: ditto. * stringpool.c: ditto. * symtab.c: ditto. * target-globals.c: ditto. * targhooks.c: ditto. * toplev.c: ditto. * tracer.c: ditto. * trans-mem.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-affine.c: ditto. * tree-browser.c: ditto. * tree.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-call-cdce.c: Include symtab.h, alias.h, double-int.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-cfg.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-cfgcleanup.c: ditto. * tree-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-chkp-opt.c: ditto. * tree-chrec.c: ditto. * tree-chkp-opt.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-core.h: Flatten header file by removing all #include statements. * tree-data-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-dfa.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-diagnostic.c: ditto. * tree-dump.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * tree-dfa.c: ditto. * tree-eh.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-emutls.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree.h: Flatten header files by removing all includes except tree-core.h. Remove inline function convert_to_ptrofftype_loc to relocate to fold-const.c. Remove macro convert_to_ptrofftype to relocate to fold-const.h. Remove inline function fold_build_pointer_plus_loc to relocate to fold-const.c. Remove macro fold_build_pointer_plus to relocate to fold-const.h. Remove inline function fold_build_pointer_plus_hwi_loc to relocate to fold-const.c. Remove macro fold_build_pointer_plus_hwi to relocate to fold-const.h. * tree-if-conv.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * tree-inline.c: ditto. * tree-into-ssa.c: ditto. * tree-iterator.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-loop-distribution.c: ditto. * tree-nested.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-nrv.c: ditto. * tree-object-size.c: ditto. * tree-outof-ssa.c: ditto. * tree-parloops.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-phinodes.c: ditto. * tree-predcom.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-pretty-print.c: ditto. * tree-profile.c: double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-scalar-evolution.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-sra.c: Include vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-ssa-alias.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa.c: ditto. * tree-ssa-ccp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-ssa-coalesce.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-copy.c: ditto. * tree-ssa-copyrename.c: ditto. * tree-ssa-dce.c: ditto. * tree-ssa-dom.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-ssa-dse.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-forwprop.c: ditto. * tree-ssa-ifcombine.c: ditto. * tree-ssa-live.c: ditto. * tree-ssa-loop.c: ditto. * tree-ssa-loop-ch.c: ditto. * tree-ssa-loop-im.c: ditto. * tree-ssa-loop-ivcanon.c: ditto. * tree-ssa-loop-ivopts.c: ditto. * tree-ssa-loop-manip.c: ditto. * tree-ssa-loop-niter.c: ditto. * tree-ssa-loop-prefetch.c: ditto. * tree-ssa-loop-unswitch.c: ditto. * tree-ssa-loop-math-opts.c: ditto. * tree-ssanames.c: ditto. * tree-ssa-operands.c: ditto. * tree-ssa-phiopt.c: ditto. * tree-ssa-phiprop.c: ditto. * tree-ssa-pre.c: ditto. * tree-ssa-propagate.c: ditto. * tree-ssa-reassoc.c: ditto. * tree-ssa-sccvn.c: ditto. * tree-ssa-sink.c: ditto. * tree-ssa-strlen.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-structalias.c: double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-tail-merge.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-ter.c: ditto. * tree-ssa-threadedge.c: ditto. * tree-ssa-threadupdate.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-uncprop.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-uninit.c: ditto. * tree-stdarg.c: Include vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-streamer.c: Include vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-streamer-in.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * tree-streamer-out.c: dittoo. * tree-switch-conversion.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-tailcall.c: ditto. * tree-vect-data-refs.c: ditto. * tree-vect-generic.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-vect-loop.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-vect-loop-manip.c: ditto. * tree-vectorizer.c: ditto. * tree-vect-patterns.c: ditto. * tree-vect-slp.c: ditto. * tree-vect-stmts.c: ditto. * tree-vrp.c: ditto. * tsan.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * ubsan.c: ditto. * value-prof.c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * varasm.c: ditto. * varpool.c: ditto. * var-tracking.c: ditto. * vmsdbgout.c: ditto. * vtable-verify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * wide-int.cc: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * xcoffout.c: ditto. * libcc1/plugin.cc: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. From-SVN: r219402
2015-01-09 21:18:42 +01:00
#include \"alias.h\"\n\
Factor unrelated declarations out of tree.h. This patch applies the rule that functions defined in FOO.c must be declared in FOO.h. One of the worst offenders in the code base is tree.h, unsurprisingly. The patch creates several new headers: attribs.h calls.h fold-const.h gcc-symtab.h print-rtl.h print-tree.h stmt.h stor-layout.h stringpool.h tree-nested.h tree-object-size.h varasm.h. Functions in each corresponding .c file got moved to those headers and others that already existed. I wanted to make this patch as mechanical as possible, so I made no attempt to fix problems like having build_addr defined in tree-inline.c. I left that for later. There were some declarations that I could not move out of tree.h because of header poisoning or the use of target macros. We forbid the inclusion of things like expr.h from FE files. While that's a reasonable idea, the FE file *still* manage to at expr.c functionality because the declarations they want to use were defined in tree.h. The affected files are builtins.h, emit-rtl.h and expr.h. If that functionality is allowed to be accessed from the FEs, then I will later move those functions out of expr.c into tree.c. I have moved these declarations to the bottom of tree.h so they are easy to identify later. There is a namespace collision with libcpp. The file gcc/symtab.c cannot use gcc/symtab.h because the #include command picks up libcpp/include/symtab.h first. So I named this file gcc-symtab.h for now. Finally, I added a new header to PLUGIN_HEADERS to account for the tree.h refactoring. I did not add all headers factored out of tree.h because it is unclear (and impossible to tell) what plugins need. This adds the one header used by the plugins in the testsuite. This will be changing quite dramatically as we progress with the header refactoring. This patch should offer some minimal incremental build advantages by reducing the size of tree.h. Changes that would otherwise affected tree.h, will now go to other headers which are less frequently included. * tree.h: Include fold-const.h. (aggregate_value_p): Moved to function.h. (alloca_call_p): Moved to calls.h. (allocate_struct_function): Moved to function.h. (apply_tm_attr): Moved to attribs.h. (array_at_struct_end_p): Moved to expr.h. (array_ref_element_size): Moved to tree-dfa.h. (array_ref_low_bound): Moved to tree-dfa.h. (array_ref_up_bound): Moved to tree.h. (assemble_alias): Moved to cgraph.h. (bit_from_pos): Moved to stor-layout.h. (build_addr): Moved to tree-nested.h. (build_duplicate_type): Moved to tree-inline.h. (build_fold_addr_expr): Moved to fold-const.h. (build_fold_addr_expr_with_type): Moved to fold-const.h. (build_fold_addr_expr_with_type_loc): Moved to fold-const.h. (build_fold_indirect_ref): Moved to fold-const.h. (build_fold_indirect_ref_loc): Moved to fold-const.h. (build_personality_function): Moved to tree.h. (build_range_check): Moved to fold-const.h. (build_simple_mem_ref): Moved to fold-const.h. (build_simple_mem_ref_loc): Moved to fold-const.h. (build_tm_abort_call): Moved to trans-mem.h. (byte_from_pos): Moved to stor-layout.h. (call_expr_flags): Moved to calls.h. (can_move_by_pieces): Moved to expr.h. (categorize_ctor_elements): Moved to expr.h. (change_decl_assembler_name): Moved to gcc-symtab.h. (combine_comparisons): Moved to fold-const.h. (complete_ctor_at_level_p): Moved to tree.h. (component_ref_field_offset): Moved to tree-dfa.h. (compute_builtin_object_size): Moved to tree-object-size.h. (compute_record_mode): Moved to stor-layout.h. (constant_boolean_node): Moved to fold-const.h. (constructor_static_from_elts_p): Moved to varasm.h. (cxx11_attribute_p): Moved to attribs.h. (debug_body): Moved to print-tree.h. (debug_find_tree): Moved to tree-inline.h. (debug_fold_checksum): Moved to fold-const.h. (debug_head): Moved to print-tree.h. (debug_head): Moved to print-tree.h. (debug_raw): Moved to print-tree.h. (debug_tree): Moved to print-tree.h. (debug_vec_tree): Moved to print-tree.h. (debug_verbose): Moved to print-tree.h. (debug_verbose): Moved to print-tree.h. (decl_attributes): Moved to attribs.h. (decl_binds_to_current_def_p): Moved to varasm.h. (decl_default_tls_model): Moved to varasm.h. (decl_replaceable_p): Moved to varasm.h. (div_if_zero_remainder): Moved to fold-const.h. (double_int mem_ref_offset): Moved to fold-const.h. (dump_addr): Moved to print-tree.h. (element_precision): Moved to machmode.h. (expand_dummy_function_end): Moved to function.h. (expand_function_end): Moved to function.h. (expand_function_start): Moved to function.h. (expand_label): Moved to stmt.h. (expr_first): Moved to tree-iterator.h. (expr_last): Moved to tree-iterator.h. (finalize_size_functions): Moved to stor-layout.h. (finish_builtin_struct): Moved to stor-layout.h. (finish_record_layout): Moved to stor-layout.h. (fixup_signed_type): Moved to stor-layout.h. (fixup_unsigned_type): Moved to stor-layout.h. (flags_from_decl_or_type): Moved to calls.h. (fold): Moved to fold-const.h. (fold_abs_const): Moved to fold-const.h. (fold_binary): Moved to fold-const.h. (fold_binary_loc): Moved to fold-const.h. (fold_binary_to_constant): Moved to fold-const.h. (fold_build1): Moved to fold-const.h. (fold_build1_initializer_loc): Moved to fold-const.h. (fold_build1_loc): Moved to fold-const.h. (fold_build1_stat_loc): Moved to fold-const.h. (fold_build2): Moved to fold-const.h. (fold_build2_initializer_loc): Moved to fold-const.h. (fold_build2_loc): Moved to fold-const.h. (fold_build2_stat_loc): Moved to fold-const.h. (fold_build3): Moved to fold-const.h. (fold_build3_loc): Moved to fold-const.h. (fold_build3_stat_loc): Moved to fold-const.h. (fold_build_call_array): Moved to fold-const.h. (fold_build_call_array_initializer): Moved to fold-const.h. (fold_build_call_array_initializer_loc): Moved to fold-const.h. (fold_build_call_array_loc): Moved to fold-const.h. (fold_build_cleanup_point_expr): Moved to fold-const.h. (fold_convert): Moved to fold-const.h. (fold_convert_loc): Moved to fold-const.h. (fold_convertible_p): Moved to fold-const.h. (fold_defer_overflow_warnings): Moved to fold-const.h. (fold_deferring_overflow_warnings_p): Moved to fold-const.h. (fold_fma): Moved to fold-const.h. (fold_ignored_result): Moved to fold-const.h. (fold_indirect_ref): Moved to fold-const.h. (fold_indirect_ref_1): Moved to fold-const.h. (fold_indirect_ref_loc): Moved to fold-const.h. (fold_read_from_constant_string): Moved to fold-const.h. (fold_real_zero_addition_p): Moved to fold-const.h. (fold_single_bit_test): Moved to fold-const.h. (fold_strip_sign_ops): Moved to fold-const.h. (fold_ternary): Moved to fold-const.h. (fold_ternary_loc): Moved to fold-const.h. (fold_unary): Moved to tree-data-ref.h. (fold_unary_ignore_overflow): Moved to fold-const.h. (fold_unary_ignore_overflow_loc): Moved to fold-const.h. (fold_unary_loc): Moved to fold-const.h. (fold_unary_to_constant): Moved to fold-const.h. (fold_undefer_and_ignore_overflow_warnings): Moved to fold-const.h. (fold_undefer_overflow_warnings): Moved to fold-const.h. (folding_initializer): Moved to fold-const.h. (free_temp_slots): Moved to function.h. (generate_setjmp_warnings): Moved to function.h. (get_attribute_name): Moved to attribs.h. (get_identifier): Moved to stringpool.h. (get_identifier_with_length): Moved to stringpool.h. (get_inner_reference): Moved to tree.h. (gimple_alloca_call_p): Moved to calls.h. (gimplify_parameters): Moved to function.h. (highest_pow2_factor): Moved to expr.h. (indent_to): Moved to print-tree.h. (init_attributes): Moved to attribs.h. (init_dummy_function_start): Moved to function.h. (init_function_start): Moved to function.h. (init_inline_once): Moved to tree-inline.h. (init_object_sizes): Moved to tree-object-size.h. (init_temp_slots): Moved to function.h. (init_tree_optimization_optabs): Moved to optabs.h. (initialize_sizetypes): Moved to stor-layout.h. (initializer_constant_valid_for_bitfield_p): Moved to varasm.h. (initializer_constant_valid_p): Moved to varasm.h. (int_const_binop): Moved to fold-const.h. (internal_reference_types): Moved to stor-layout.h. (invert_tree_comparison): Moved to fold-const.h. (invert_truthvalue): Moved to fold-const.h. (invert_truthvalue_loc): Moved to fold-const.h. (is_tm_ending_fndecl): Moved to trans-mem.h. (is_tm_may_cancel_outer): Moved to trans-mem.h. (is_tm_pure): Moved to trans-mem.h. (is_tm_safe): Moved to trans-mem.h. (layout_decl): Moved to stor-layout.h. (layout_type): Moved to stor-layout.h. (lookup_attribute_spec): Moved to attribs.h. (make_accum_type): Moved to stor-layout.h. (make_decl_one_only): Moved to varasm.h. (make_decl_rtl): Moved to tree.h. (make_decl_rtl_for_debug): Moved to varasm.h. (make_fract_type): Moved to stor-layout.h. (make_or_reuse_sat_signed_accum_type): Moved to stor-layout.h. (make_or_reuse_sat_signed_fract_type): Moved to stor-layout.h. (make_or_reuse_sat_unsigned_accum_type): Moved to stor-layout.h. (make_or_reuse_sat_unsigned_fract_type): Moved to stor-layout.h. (make_or_reuse_signed_accum_type): Moved to stor-layout.h. (make_or_reuse_signed_fract_type): Moved to stor-layout.h. (make_or_reuse_unsigned_accum_type): Moved to stor-layout.h. (make_or_reuse_unsigned_fract_type): Moved to stor-layout.h. (make_range): Moved to fold-const.h. (make_range_step): Moved to fold-const.h. (make_sat_signed_accum_type): Moved to stor-layout.h. (make_sat_signed_fract_type): Moved to stor-layout.h. (make_sat_unsigned_accum_type): Moved to stor-layout.h. (make_sat_unsigned_fract_type): Moved to stor-layout.h. (make_signed_accum_type): Moved to stor-layout.h. (make_signed_fract_type): Moved to stor-layout.h. (make_signed_type): Moved to stor-layout.h. (make_unsigned_accum_type): Moved to stor-layout.h. (make_unsigned_fract_type): Moved to stor-layout.h. (make_unsigned_type): Moved to stor-layout.h. (mark_decl_referenced): Moved to varasm.h. (mark_referenced): Moved to varasm.h. (may_negate_without_overflow_p): Moved to fold-const.h. (maybe_get_identifier): Moved to stringpool.h. (merge_ranges): Moved to fold-const.h. (merge_weak): Moved to varasm.h. (mode_for_size_tree): Moved to stor-layout.h. (multiple_of_p): Moved to fold-const.h. (must_pass_in_stack_var_size): Moved to calls.h. (must_pass_in_stack_var_size_or_pad): Moved to calls.h. (native_encode_expr): Moved to fold-const.h. (native_interpret_expr): Moved to fold-const.h. (non_lvalue): Moved to fold-const.h. (non_lvalue_loc): Moved to fold-const.h. (normalize_offset): Moved to stor-layout.h. (normalize_rli): Moved to stor-layout.h. (notice_global_symbol): Moved to varasm.h. (omit_one_operand): Moved to fold-const.h. (omit_one_operand_loc): Moved to fold-const.h. (omit_two_operands): Moved to fold-const.h. (omit_two_operands_loc): Moved to fold-const.h. (operand_equal_p): Moved to tree-data-ref.h. (parse_input_constraint): Moved to stmt.h. (parse_output_constraint): Moved to stmt.h. (place_field): Moved to stor-layout.h. (pop_function_context): Moved to function.h. (pop_temp_slots): Moved to function.h. (pos_from_bit): Moved to stor-layout.h. (preserve_temp_slots): Moved to function.h. (print_node): Moved to print-tree.h. (print_node_brief): Moved to print-tree.h. (print_rtl): Moved to rtl.h. (process_pending_assemble_externals): Moved to varasm.h. (ptr_difference_const): Moved to fold-const.h. (push_function_context): Moved to function.h. (push_struct_function): Moved to function.h. (push_temp_slots): Moved to function.h. (record_tm_replacement): Moved to trans-mem.h. (relayout_decl): Moved to stor-layout.h. (resolve_asm_operand_names): Moved to stmt.h. (resolve_unique_section): Moved to varasm.h. (rli_size_so_far): Moved to stor-layout.h. (rli_size_unit_so_far): Moved to stor-layout.h. (round_down): Moved to fold-const.h. (round_down_loc): Moved to fold-const.h. (round_up): Moved to fold-const.h. (round_up_loc): Moved to fold-const.h. (set_decl_incoming_rtl): Moved to emit-rtl.h. (set_decl_rtl): Moved to tree.h. (set_min_and_max_values_for_integral_type): Moved to stor-layout.h. (set_user_assembler_name): Moved to varasm.h. (setjmp_call_p): Moved to calls.h. (size_binop): Moved to fold-const.h. (size_binop_loc): Moved to fold-const.h. (size_diffop): Moved to fold-const.h. (size_diffop_loc): Moved to fold-const.h. (size_int_kind): Moved to fold-const.h. (stack_protect_epilogue): Moved to function.h. (start_record_layout): Moved to stor-layout.h. (supports_one_only): Moved to varasm.h. (swap_tree_comparison): Moved to fold-const.h. (tm_malloc_replacement): Moved to trans-mem.h. (tree build_fold_addr_expr_loc): Moved to fold-const.h. (tree build_invariant_address): Moved to fold-const.h. (tree_binary_nonnegative_warnv_p): Moved to fold-const.h. (tree_binary_nonzero_warnv_p): Moved to fold-const.h. (tree_call_nonnegative_warnv_p): Moved to fold-const.h. (tree_expr_nonnegative_p): Moved to fold-const.h. (tree_expr_nonnegative_warnv_p): Moved to fold-const.h. (tree_output_constant_def): Moved to varasm.h. (tree_overlaps_hard_reg_set): Moved to stmt.h. (tree_single_nonnegative_warnv_p): Moved to fold-const.h. (tree_single_nonzero_warnv_p): Moved to fold-const.h. (tree_swap_operands_p): Moved to fold-const.h. (tree_unary_nonnegative_warnv_p): Moved to fold-const.h. (tree_unary_nonzero_warnv_p): Moved to fold-const.h. (update_alignment_for_field): Moved to stor-layout.h. (use_register_for_decl): Moved to function.h. (variable_size): Moved to rtl.h. (vector_type_mode): Moved to stor-layout.h. * cgraph.h: Corresponding changes. * emit-rtl.h: Corresponding changes. * expr.h: Corresponding changes. * function.h: Corresponding changes. * optabs.h: Corresponding changes. * trans-mem.h: Corresponding changes. Protect against multiple inclusion. * tree-inline.h: Corresponding changes. * tree-iterator.h: Corresponding changes. * tree-dfa.h: Include expr.h. * tree-ssanames.h: Include stringpool.h. * attribs.h: New file. * calls.h: New file. * fold-const.h: New file. * gcc-symtab.h: New file. * print-rtl.h: New file. * print-tree.h: New file. * stmt.h: New file. * stor-layout.h: New file. * strinpool.h: New file. * tree-nested.h: New file * tree-object-size.h: New file. * varasm.h: New file. * Makefile.in (PLUGIN_HEADERS): Add stringpool.h. * alias.c: Include varasm.h. Include expr.h. * asan.c: Include calls.h. Include stor-layout.h. Include varasm.h. * attribs.c: Include stringpool.h. Include attribs.h. Include stor-layout.h. * builtins.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. Include tree-object-size.h. * calls.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. Include attribs.h. * cfgexpand.c: Include stringpool.h. Include varasm.h. Include stor-layout.h. Include stmt.h. Include print-tree.h. * cgraph.c: Include varasm.h. Include calls.h. Include print-tree.h. * cgraphclones.c: Include stringpool.h. Include function.h. Include emit-rtl.h. Move inclusion of rtl.h earlier in the file. * cgraphunit.c: Include varasm.h. Include stor-layout.h. Include stringpool.h. * cilk-common.c: Include stringpool.h. Include stor-layout.h. * combine.c: Include stor-layout.h. * config/aarch64/aarch64-builtins.c: Include stor-layout.h. Include stringpool.h. Include calls.h. * config/aarch64/aarch64.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/alpha/alpha.c: Include stor-layout.h. Include calls.h. Include varasm.h. * config/arc/arc.c: Include varasm.h. Include stor-layout.h. Include stringpool.h. Include calls.h. * config/arm/arm.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/avr/avr-c.c: Include stor-layout.h. * config/avr/avr-log.c: Include print-tree.h. * config/avr/avr.c: Include print-tree.h. Include calls.h. Include stor-layout.h. Include stringpool.h. * config/bfin/bfin.c: Include varasm.h. Include calls.h. * config/c6x/c6x.c: Include stor-layout.h. Include varasm.h. Include calls.h. Include stringpool.h. * config/cr16/cr16.c: Include stor-layout.h. Include calls.h. * config/cris/cris.c: Include varasm.h. Include stor-layout.h. Include calls.h. Include stmt.h. * config/darwin.c: Include stringpool.h. Include varasm.h. Include stor-layout.h. * config/epiphany/epiphany.c: Include stor-layout.h. Include varasm.h. Include calls.h. Include stringpool.h. * config/fr30/fr30.c: Include stor-layout.h. Include varasm.h. * config/frv/frv.c: Include varasm.h. Include stor-layout.h. Include stringpool.h. * config/h8300/h8300.c: Include stor-layout.h. Include varasm.h. Include calls.h. Include stringpool.h. * config/i386/i386.c: Include stringpool.h. Include attribs.h. Include calls.h. Include stor-layout.h. Include varasm.h. * config/i386/winnt-cxx.c: Include stringpool.h. Include attribs.h. * config/i386/winnt.c: Include stringpool.h. Include varasm.h. * config/ia64/ia64-c.c: Include stringpool.h. * config/ia64/ia64.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/iq2000/iq2000.c: Include stor-layout.h. Include calls.h. Include varasm.h. * config/lm32/lm32.c: Include calls.h. * config/m32c/m32c.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/m32r/m32r.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. Include calls.h. * config/m68k/m68k.c: Include calls.h. Include stor-layout.h. Include varasm.h. * config/mcore/mcore.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. Include calls.h. * config/mep/mep.c: Include varasm.h. Include calls.h. Include stringpool.h. Include stor-layout.h. * config/microblaze/microblaze.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/mips/mips.c: Include varasm.h. Include stringpool.h. Include stor-layout.h. Include calls.h. * config/mmix/mmix.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/mn10300/mn10300.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/moxie/moxie.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/msp430/msp430.c: Include stor-layout.h. Include calls.h. * config/nds32/nds32.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/pa/pa.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. Include calls.h. * config/pdp11/pdp11.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/picochip/picochip.c: Include calls.h. Include stor-layout.h. Include stringpool.h. Include varasm.h. * config/rl78/rl78.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/rs6000/rs6000-c.c: Include stor-layout.h. Include stringpool.h. * config/rs6000/rs6000.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include print-tree.h. Include varasm.h. * config/rx/rx.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/s390/s390.c: Include print-tree.h. Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/score/score.c: Include stringpool.h. Include calls.h. Include varasm.h. Include stor-layout.h. * config/sh/sh-c.c: Include stringpool.h. Include attribs.h.h. * config/sh/sh.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/sol2-c.c: Include stringpool.h. Include attribs.h. * config/sol2-cxx.c: Include stringpool.h. * config/sol2.c: Include stringpool.h. Include varasm.h. * config/sparc/sparc.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/spu/spu-c.c: Include stringpool.h. * config/spu/spu.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/stormy16/stormy16.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/tilegx/tilegx.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/tilepro/tilepro.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/v850/v850-c.c: Include stringpool.h. Include attribs.h. * config/v850/v850.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/vax/vax.c: Include calls.h. Include varasm.h. * config/vms/vms.c: Include stringpool.h. * config/vxworks.c: Include stringpool.h. * config/xtensa/xtensa.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * convert.c: Include stor-layout.h. * coverage.c: Include stringpool.h. Include stor-layout.h. * dbxout.c: Include varasm.h. Include stor-layout.h. * dojump.c: Include stor-layout.h. * dse.c: Include stor-layout.h. * dwarf2asm.c: Include stringpool.h. Include varasm.h. * dwarf2cfi.c: Include stor-layout.h. * dwarf2out.c: Include rtl.h. Include stringpool.h. Include stor-layout.h. Include varasm.h. Include function.h. Include emit-rtl.h. Move inclusion of rtl.h earlier in the file. * emit-rtl.c: Include varasm.h. * except.c: Include stringpool.h. Include stor-layout.h. * explow.c: Include stor-layout.h. * expmed.c: Include stor-layout.h. * expr.c: Include stringpool.h. Include stor-layout.h. Include attribs.h. Include varasm.h. * final.c: Include varasm.h. * fold-const.c: Include stor-layout.h. Include calls.h. Include tree-iterator.h. * function.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. * genattrtab.c (write_header): Emit includes for varasm.h, stor-layout.h and calls.h. * genautomata.c (main): Likewise. * genemit.c: Likewise. * genopinit.c: Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c: Likewise. * genpreds.c (write_insn_preds_c): Likewise. * gengtype.c (open_base_files): Add stringpool.h. * gimple-expr.c: Include stringpool.h. Include stor-layout.h. * gimple-fold.c: Include stringpool.h. Include expr.h. Include stmt.h. Include stor-layout.h. * gimple-low.c: Include tree-nested.h. Include calls.h. * gimple-pretty-print.c: Include stringpool.h. * gimple-ssa-strength-reduction.c: Include stor-layout.h. Include expr.h. * gimple-walk.c: Include stmt.h. * gimple.c: Include calls.h. Include stmt.h. Include stor-layout.h. * gimplify.c: Include stringpool.h. Include calls.h. Include varasm.h. Include stor-layout.h. Include stmt.h. Include print-tree.h. Include expr.h. * gimplify-me.c: Include stmt.h Include stor-layout.h * internal-fn.c: Include stor-layout.h. * ipa-devirt.c: Include print-tree.h. Include calls.h. * ipa-inline-analysis.c: Include stor-layout.h. Include stringpool.h. Include print-tree.h. * ipa-inline.c: Include trans-mem.h. Include calls.h. * ipa-prop.c: Include expr.h. Include stor-layout.h. Include print-tree.h. * ipa-pure-const.c: Include print-tree.h. Include calls.h. * ipa-reference.c: Include calls.h. * ipa-split.c: Include stringpool.h. Include expr.h. Include calls.h. * ipa.c: Include calls.h. Include stringpool.h. * langhooks.c: Include stringpool.h. Include attribs.h. * lto-cgraph.c: Include stringpool.h. * lto-streamer-in.c: Include stringpool.h. * lto-streamer-out.c: Include stor-layout.h. Include stringpool.h. * omp-low.c: Include stringpool.h. Include stor-layout.h. Include expr.h. * optabs.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. * passes.c: Include varasm.h. * predict.c: Include calls.h. * print-rtl.c: Include print-tree.h. * print-tree.c: Include varasm.h. Include print-rtl.h. Include stor-layout.h. * realmpfr.c: Include stor-layout.h. * reg-stack.c: Include varasm.h. * sdbout.c: Include varasm.h. Include stor-layout.h. * simplify-rtx.c: Include varasm.h. * stmt.c: Include varasm.h. Include stor-layout.h. * stor-layout.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. Include print-tree.h. * symtab.c: Include rtl.h. Include print-tree.h. Include varasm.h. Include function.h. Include emit-rtl.h. * targhooks.c: Include stor-layout.h. Include varasm.h. * toplev.c: Include varasm.h. Include tree-inline.h. * trans-mem.c: Include calls.h. Include function.h. Include rtl.h. Include emit-rtl.h. * tree-affine.c: Include expr.h. * tree-browser.c: Include print-tree.h. * tree-call-cdce.c: Include stor-layout.h. * tree-cfg.c: Include trans-mem.h. Include stor-layout.h. Include print-tree.h. * tree-complex.c: Include stor-layout.h. * tree-data-ref.c: Include expr.h. * tree-dfa.c: Include stor-layout.h. * tree-eh.c: Include expr.h. Include calls.h. * tree-emutls.c: Include stor-layout.h. Include varasm.h. * tree-if-conv.c: Include stor-layout.h. * tree-inline.c: Include stor-layout.h. Include calls.h. * tree-loop-distribution.c: Include stor-layout.h. * tree-nested.c: Include stringpool.h. Include stor-layout.h. * tree-object-size.c: Include tree-object-size.h. * tree-outof-ssa.c: Include stor-layout.h. * tree-parloops.c: Include stor-layout.h. Include tree-nested.h. * tree-pretty-print.c: Include stor-layout.h. Include expr.h. * tree-profile.c: Include varasm.h. Include tree-nested.h. * tree-scalar-evolution.c: Include expr.h. * tree-sra.c: Include stor-layout.h. * tree-ssa-address.c: Include stor-layout.h. * tree-ssa-ccp.c: Include stor-layout.h. * tree-ssa-dce.c: Include calls.h. * tree-ssa-dom.c: Include stor-layout.h. * tree-ssa-forwprop.c: Include stor-layout.h. * tree-ssa-ifcombine.c: Include stor-layout.h. * tree-ssa-loop-ivopts.c: Include stor-layout.h. * tree-ssa-loop-niter.c: Include calls.h. Include expr.h. * tree-ssa-loop-prefetch.c: Include stor-layout.h. * tree-ssa-math-opts.c: Include stor-layout.h. * tree-ssa-operands.c: Include stmt.h. Include print-tree.h. * tree-ssa-phiopt.c: Include stor-layout.h. * tree-ssa-reassoc.c: Include stor-layout.h. * tree-ssa-sccvn.c: Include stor-layout.h. * tree-ssa-sink.c: Include stor-layout.h. * tree-ssa-strlen.c: Include stor-layout.h. * tree-ssa-structalias.c: Include stor-layout.h. Include stmt.h. * tree-ssa-tail-merge.c: Include stor-layout.h. Include trans-mem.h. * tree-ssa-uncprop.c: Include stor-layout.h. * tree-ssa.c: Include stor-layout.h. * tree-ssanames.c: Include stor-layout.h. * tree-streamer-in.c: Include stringpool.h. * tree-streamer-out.c: Include stor-layout.h. * tree-switch-conversion.c: Include varasm.h. Include stor-layout.h. * tree-tailcall.c: Include stor-layout.h. * tree-vect-data-refs.c: Include stor-layout.h. * tree-vect-generic.c: Include stor-layout.h. * tree-vect-loop.c: Include stor-layout.h. * tree-vect-patterns.c: Include stor-layout.h. * tree-vect-slp.c: Include stor-layout.h. * tree-vect-stmts.c: Include stor-layout.h. * tree-vectorizer.c: Include stor-layout.h. * tree-vrp.c: Include stor-layout.h. Include calls.h. * tree.c: Include stor-layout.h. Include calls.h. Include attribs.h. Include varasm.h. * tsan.c: Include expr.h. * ubsan.c: Include stor-layout.h. Include stringpool.h. * value-prof.c: Include tree-nested.h. Include calls.h. * var-tracking.c: Include varasm.h. Include stor-layout.h. * varasm.c: Include stor-layout.h. Include stringpool.h. Include gcc-symtab.h. Include varasm.h. * varpool.c: Include varasm.h. * vmsdbgout.c: Include varasm.h. * xcoffout.c: Include varasm.h. ada/ChangeLog * gcc-interface/decl.c: Include stringpool.h Include stor-layout.h * gcc-interface/misc.c: Include stor-layout.h Include print-tree.h * gcc-interface/trans.c: Include stringpool.h Include stor-layout.h Include stmt.h Include varasm.h * gcc-interface/utils.c: Include stringpool.h Include stor-layout.h Include attribs.h Include varasm.h * gcc-interface/utils2.c: Include stringpool.h Include stor-layout.h Include attribs.h Include varasm.h c-family/ChangeLog * c-common.c: Include fold-const.h. Include stor-layout.h. Include calls.h. Include stringpool.h. Include attribs.h. Include varasm.h. Include trans-mem.h. * c-cppbuiltin.c: Include stor-layout.h. Include stringpool.h. * c-format.c: Include stringpool.h. * c-lex.c: Include stringpool.h. Include stor-layout.h. * c-pragma.c: Include stringpool.h. Include attribs.h. Include varasm.h. Include gcc-symtab.h. * c-pretty-print.c: Include stor-layout.h. Include attribs.h. * cilk.c: Include stringpool.h. Include calls.h. c/ChangeLog * c-decl.c: Include print-tree.h. Include stor-layout.h. Include varasm.h. Include attribs.h. Include stringpool.h. * c-lang.c: Include fold-const.h. * c-parser.c: Include stringpool.h. Include attribs.h. Include stor-layout.h. Include varasm.h. Include trans-mem.h. * c-typeck.c: Include stor-layout.h. Include trans-mem.h. Include varasm.h. Include stmt.h. cp/ChangeLog * call.c: Include stor-layout.h. Include trans-mem.h. Include stringpool.h. * class.c: Include stringpool.h. Include stor-layout.h. Include attribs.h. * cp-gimplify.c: Include stor-layout.h. * cvt.c: Include stor-layout.h. * decl.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include attribs.h. Include calls.h. * decl2.c: Include stringpool.h. Include varasm.h. Include attribs.h. Include stor-layout.h. Include calls.h. * error.c: Include stringpool.h. * except.c: Include stringpool.h. Include trans-mem.h. Include attribs.h. * init.c: Include stringpool.h. Include varasm.h. * lambda.c: Include stringpool.h. * lex.c: Include stringpool.h. * mangle.c: Include stor-layout.h. Include stringpool.h. * method.c: Include stringpool.h. Include varasm.h. * name-lookup.c: Include stringpool.h. Include print-tree.h. Include attribs.h. * optimize.c: Include stringpool.h. * parser.c: Include print-tree.h. Include stringpool.h. Include attribs.h. Include trans-mem.h. * pt.c: Include stringpool.h. Include varasm.h. Include attribs.h. Include stor-layout.h. * ptree.c: Include print-tree.h. * repo.c: Include stringpool.h. * rtti.c: Include stringpool.h. Include stor-layout.h. * semantics.c: Include stmt.h. Include varasm.h. Include stor-layout.h. Include stringpool.h. * tree.c: Include stor-layout.h. Include print-tree.h. Include tree-iterator.h. * typeck.c: Include stor-layout.h. Include varasm.h. * typeck2.c: Include stor-layout.h. Include varasm.h. * vtable-class-hierarchy.c: Include stringpool.h. Include stor-layout.h. fortran/ChangeLog * decl.c: Include stringpool.h. * iresolve.c: Include stringpool.h. * match.c: Include stringpool.h. * module.c: Include stringpool.h. * target-memory.c: Include stor-layout.h. * trans-common.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. * trans-const.c: Include stor-layout.h. * trans-decl.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include attribs.h. * trans-expr.c: Include stringpool.h. * trans-intrinsic.c: Include stringpool.h. Include tree-nested.h. Include stor-layout.h. * trans-io.c: Include stringpool.h. Include stor-layout.h. * trans-openmp.c: Include stringpool.h. * trans-stmt.c: Include stringpool.h. * trans-types.c: Include stor-layout.h. Include stringpool.h. * trans.c: Include stringpool.h. go/ChangeLog * go-backend.c: Include stor-layout.h. * go-gcc.cc: Include stringpool.h. Include stor-layout.h. Include varasm.h. * go-lang.c: Include stor-layout.h. java/ChangeLog * builtins.c: Include stor-layout.h. Include stringpool.h. * class.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. * constants.c: Include stringpool.h. Include stor-layout.h. * decl.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. * except.c: Include stringpool.h. Include stor-layout.h. * expr.c: Include stringpool.h. Include stor-layout.h. * jcf-parse.c: Include stringpool.h. * mangle.c: Include stringpool.h. * resource.c: Include stringpool.h. Include stor-layout.h. * typeck.c: Include stor-layout.h. Include stringpool.h. * verify-glue.c: Include stringpool.h. lto/ChangeLog * lto-lang.c: Include stringpool.h. Include stor-layout.h. * lto-partition.c: Include gcc-symtab.h. * lto.c: Include stor-layout.h. objc/ChangeLog * objc-act.c: Include stringpool.h. Include stor-layout.h. Include attribs.h. * objc-encoding.c: Include stringpool.h. Include stor-layout.h. * objc-gnu-runtime-abi-01.c: Include stringpool.h. * objc-next-runtime-abi-01.c: Include stringpool.h. * objc-next-runtime-abi-02.c: Include stringpool.h. * objc-runtime-shared-support.c: Include stringpool.h. testsuite/ChangeLog * gcc.dg/plugin/selfassign.c: Include stringpool.h. * gcc.dg/plugin/start_unit_plugin.c: Likewise. From-SVN: r205023
2013-11-19 13:31:09 +01:00
#include \"varasm.h\"\n\
#include \"stor-layout.h\"\n\
#include \"calls.h\"\n\
Move MEMMODEL_* from coretypes.h to memmodel.h 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * coretypes.h: Move MEMMODEL_* macros and enum memmodel definition into ... * memmodel.h: This file. * alias.c, asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, caller-save.c, calls.c, ccmp.c, cfgbuild.c, cfgcleanup.c, cfgexpand.c, cfgloopanal.c, cfgrtl.c, cilk-common.c, combine.c, combine-stack-adj.c, common/config/aarch64/aarch64-common.c, common/config/arm/arm-common.c, common/config/bfin/bfin-common.c, common/config/c6x/c6x-common.c, common/config/i386/i386-common.c, common/config/ia64/ia64-common.c, common/config/nvptx/nvptx-common.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-c.c, config/aarch64/cortex-a57-fma-steering.c, config/arc/arc.c, config/arc/arc-c.c, config/arm/arm-builtins.c, config/arm/arm-c.c, config/avr/avr.c, config/avr/avr-c.c, config/avr/avr-log.c, config/bfin/bfin.c, config/c6x/c6x.c, config/cr16/cr16.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/epiphany/epiphany.c, config/epiphany/mode-switch-use.c, config/epiphany/resolve-sw-modes.c, config/fr30/fr30.c, config/frv/frv.c, config/ft32/ft32.c, config/h8300/h8300.c, config/i386/i386-c.c, config/i386/winnt.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68k/m68k.c, config/mcore/mcore.c, config/microblaze/microblaze.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-memory-manipulation.c, config/nds32/nds32-predicates.c, config/nds32/nds32.c, config/nios2/nios2.c, config/nvptx/nvptx.c, config/pa/pa.c, config/pdp11/pdp11.c, config/rl78/rl78.c, config/rs6000/rs6000-c.c, config/rx/rx.c, config/s390/s390-c.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh-c.c, config/sh/sh-mem.cc, config/sh/sh_treg_combine.cc, config/sol2.c, config/spu/spu.c, config/stormy16/stormy16.c, config/tilegx/tilegx.c, config/tilepro/tilepro.c, config/v850/v850.c, config/vax/vax.c, config/visium/visium.c, config/vms/vms-c.c, config/xtensa/xtensa.c, coverage.c, cppbuiltin.c, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, df-core.c, df-problems.c, df-scan.c, dojump.c, dse.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, fold-const.c, function.c, fwprop.c, gcse.c, ggc-page.c, haifa-sched.c, hsa-brig.c, hsa-gen.c, hw-doloop.c, ifcvt.c, init-regs.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-lives.c, ira.c, jump.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lra.c, lra-assigns.c, lra-coalesce.c, lra-constraints.c, lra-eliminations.c, lra-lives.c, lra-remat.c, lra-spills.c, mode-switching.c, modulo-sched.c, omp-low.c, passes.c, postreload-gcse.c, postreload.c, predict.c, print-rtl-function.c, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, reload.c, reload1.c, reorg.c, resource.c, rtl-chkp.c, rtl-tests.c, rtlanal.c, rtlhooks.c, sched-deps.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, shrink-wrap.c, simplify-rtx.c, stack-ptr-mod.c, stmt.c, stor-layout.c, target-globals.c, targhooks.c, toplev.c, tree-nested.c, tree-outof-ssa.c, tree-profile.c, tree-ssa-coalesce.c, tree-ssa-ifcombine.c, tree-ssa-loop-ivopts.c, tree-ssa-loop.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-vect-data-refs.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Include memmodel.h. * genattrtab.c (write_header): Include memmodel.h in generated file. * genautomata.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genconditions.c (write_header): Include memmodel.h earlier in generated file. * genemit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * Makefile.in (PLUGIN_HEADERS): Include memmodel.h gcc/ada/ * gcc-interface/utils2.c: Include memmodel.h. gcc/c-family/ * c-cppbuiltin.c: Include memmodel.h. * c-opts.c: Likewise. * c-pragma.c: Likewise. * c-warn.c: Likewise. gcc/c/ * c-typeck.c: Include memmodel.h. gcc/cp/ * decl2.c: Include memmodel.h. * rtti.c: Likewise. gcc/fortran/ * trans-intrinsic.c: Include memmodel.h. gcc/go/ * go-backend.c: Include memmodel.h. libgcc/ * libgcov-profiler.c: Replace MEMMODEL_* macros by their __ATOMIC_* equivalent. * config/tilepro/atomic.c: Likewise and stop casting model to enum memmodel. From-SVN: r241121
2016-10-13 16:17:52 +02:00
#include \"memmodel.h\"\n\
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
#include \"tm_p.h\"\n\
#include \"insn-config.h\"\n\
#include \"recog.h\"\n\
#include \"output.h\"\n\
#include \"flags.h\"\n\
tree-core.h: Include symtab.h. 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * tree-core.h: Include symtab.h. * rtl.h: Include hard-reg-set.h but not flags.h. (HARD_CONST): Remove condition compilation involving HARD_CONST since hard-reg-set.h is always included. * regs.h: Don't include hard-reg-set.h or rtl.h. * cfg.h: Include dominance.h. * gimple.h: Include tree-ssa-alias.h and gimple-expr.h. * backend.h: New. Aggregate commonly used backend header files. * gimple-ssa.h: Don't include tree-hasher.h. * ssa.h: New. Aggregate commonly used SSA header files. * regset.h: Remove bitmap.h and hard-reg-set.h #includes. * sel-sched-ir.h: Flatten includes. * lra-int.h: Flatten completely. * sel-sched-dump.h: Flatten includes. * ira-int.h: Flatten includes. * gimple-streamer.h: Remove all includes. * cfgloop.h: Remove all #includes except cfgloopmanip.h. * resource.h: Flatten hard-reg-set.h and df.h. * sched-int.h: Flatten insn-arrt.h and df.h. * valtrack.h: flatten bitmap.h, df.h, and rtl.h * df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h. * genattrtab.c (write_header): Adjust generated includes. * genautomata.c (main): Likewise. * genconditions.c (write-header): Likewise. * genemit.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * alias.c: Adjust includes. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse-common.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * valtrack.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/aarch64/cortex-a57-fma-steering.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/aarch-common.c: Likewise. * config/arm/arm-builtins.c: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-c.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386-c.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze-c.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430-c.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78-c.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390-c.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh-c.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sol2-c.c: Likewise. * config/sol2-cxx.c: Likewise. * config/sol2-stubs.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc-c.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu-c.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/mul-tables.c: Likewise. * config/tilegx/tilegx-c.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/mul-tables.c: Likewise. * config/tilepro/tilepro-c.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/vms/vms-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. ada 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c: Adjust includes. * gcc-interface/decl.c: Likewise. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. c 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c: Adjust includes. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. c-family 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c: Adjust includes. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * call.c: Adjust includes. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. fortran 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * convert.c: Adjust includes. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * go-backend.c: Adjust includes. * go-gcc.cc: Likewise. * go-lang.c: Likewise. java 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Adjust includes. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. jit 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Adjust includes. * jit-common.h: Likewise. * jit-playback.c: Likewise. lto 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Adjust includes. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objc-act.c: Adjust includes. * objc-encoding.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-lang.c: Likewise. * objc-map.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. objcp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c: Adjust includes. * objcp-lang.c: Likewise. From-SVN: r225531
2015-07-08 02:53:03 +02:00
#include \"df.h\"\n\
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
#include \"resource.h\"\n\
#include \"diagnostic-core.h\"\n\
#include \"reload.h\"\n\
genemit.c (main): Add tm-constrs.h to included headers. * genemit.c (main): Add tm-constrs.h to included headers. * genoutput.c (output_prologue): Add tm-constrs.h to included headers. * genpeep.c (main): Add tm-constrs.h to included headers. * genpreds.c (write_satisfies_constraint_fns): Rename to ... (write_tm_constrs_h): this and write complete file. (write_tm_preds_h): Do not emit satisfies_constraint fns. (write_insn_preds_c): Add tm-constrs.h to included headers. (gen_constrs): New variable. (parse_option): Parse "-c". (main): Invoke write_tm_constrs_h. * genrecog.c (write_header): Add tm-constrs.h to included headers. * Makefile.in (STAGECOPYSTUFF): Add tm-constrs.h. (object_out_file): Add tm-constrs.h dependency. (insn-emit.o): Same. (insn-output.o): Same. (insn-peep.o): Same. (insn-preds.o): Same. (insn-recog.o): Same. (tm-constsr.h): New target. (s-constrs-h): New target. * config/rs6000/constraints.md: New file. * config/rs6000/rs6000.c: Include tm-constrs.h. (num_insn_constant_wide): Convert to satisfies_constraint. (rs6000_rtx_costs): Convert to satisfies_constraint. * config/rs6000/rs6000.h (REG_CLASS_FROM_LETTER): Delete. (CONST_OK_FOR_LETTER_P): Delete. (CONST_DOUBLE_OK_FOR_LETTER_P): Delete. (EXTRA_CONSTRAINT): Delete. (EXTRA_MEMORY_CONSTRAINT): Delete. (EXTRA_ADDRESS_CONSTRAINT): Delete. * config/rs6000/predicates.md: Convert to satisfies_constraint. * config/rs6000/rs6000.md: Include constraints.md. Convert to satisfies_constraint. * config/i386/i386.c: Include tm-constrs.h. From-SVN: r112508
2006-03-29 23:07:12 +02:00
#include \"regs.h\"\n\
#include \"emit-rtl.h\"\n\
genemit.c (main): Add tm-constrs.h to included headers. * genemit.c (main): Add tm-constrs.h to included headers. * genoutput.c (output_prologue): Add tm-constrs.h to included headers. * genpeep.c (main): Add tm-constrs.h to included headers. * genpreds.c (write_satisfies_constraint_fns): Rename to ... (write_tm_constrs_h): this and write complete file. (write_tm_preds_h): Do not emit satisfies_constraint fns. (write_insn_preds_c): Add tm-constrs.h to included headers. (gen_constrs): New variable. (parse_option): Parse "-c". (main): Invoke write_tm_constrs_h. * genrecog.c (write_header): Add tm-constrs.h to included headers. * Makefile.in (STAGECOPYSTUFF): Add tm-constrs.h. (object_out_file): Add tm-constrs.h dependency. (insn-emit.o): Same. (insn-output.o): Same. (insn-peep.o): Same. (insn-preds.o): Same. (insn-recog.o): Same. (tm-constsr.h): New target. (s-constrs-h): New target. * config/rs6000/constraints.md: New file. * config/rs6000/rs6000.c: Include tm-constrs.h. (num_insn_constant_wide): Convert to satisfies_constraint. (rs6000_rtx_costs): Convert to satisfies_constraint. * config/rs6000/rs6000.h (REG_CLASS_FROM_LETTER): Delete. (CONST_OK_FOR_LETTER_P): Delete. (CONST_DOUBLE_OK_FOR_LETTER_P): Delete. (EXTRA_CONSTRAINT): Delete. (EXTRA_MEMORY_CONSTRAINT): Delete. (EXTRA_ADDRESS_CONSTRAINT): Delete. * config/rs6000/predicates.md: Convert to satisfies_constraint. * config/rs6000/rs6000.md: Include constraints.md. Convert to satisfies_constraint. * config/i386/i386.c: Include tm-constrs.h. From-SVN: r112508
2006-03-29 23:07:12 +02:00
#include \"tm-constrs.h\"\n");
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
FOR_ALL_PREDICATES (p)
write_one_predicate_function (p);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
if (constraint_max_namelen > 0)
{
write_lookup_constraint_1 ();
write_lookup_constraint_array ();
if (have_register_constraints)
write_reg_class_for_constraint_1 ();
write_constraint_satisfied_p_array ();
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
if (have_const_int_constraints)
write_insn_const_int_ok_for_constraint ();
}
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
}
/* Argument parsing. */
static bool gen_header;
genemit.c (main): Add tm-constrs.h to included headers. * genemit.c (main): Add tm-constrs.h to included headers. * genoutput.c (output_prologue): Add tm-constrs.h to included headers. * genpeep.c (main): Add tm-constrs.h to included headers. * genpreds.c (write_satisfies_constraint_fns): Rename to ... (write_tm_constrs_h): this and write complete file. (write_tm_preds_h): Do not emit satisfies_constraint fns. (write_insn_preds_c): Add tm-constrs.h to included headers. (gen_constrs): New variable. (parse_option): Parse "-c". (main): Invoke write_tm_constrs_h. * genrecog.c (write_header): Add tm-constrs.h to included headers. * Makefile.in (STAGECOPYSTUFF): Add tm-constrs.h. (object_out_file): Add tm-constrs.h dependency. (insn-emit.o): Same. (insn-output.o): Same. (insn-peep.o): Same. (insn-preds.o): Same. (insn-recog.o): Same. (tm-constsr.h): New target. (s-constrs-h): New target. * config/rs6000/constraints.md: New file. * config/rs6000/rs6000.c: Include tm-constrs.h. (num_insn_constant_wide): Convert to satisfies_constraint. (rs6000_rtx_costs): Convert to satisfies_constraint. * config/rs6000/rs6000.h (REG_CLASS_FROM_LETTER): Delete. (CONST_OK_FOR_LETTER_P): Delete. (CONST_DOUBLE_OK_FOR_LETTER_P): Delete. (EXTRA_CONSTRAINT): Delete. (EXTRA_MEMORY_CONSTRAINT): Delete. (EXTRA_ADDRESS_CONSTRAINT): Delete. * config/rs6000/predicates.md: Convert to satisfies_constraint. * config/rs6000/rs6000.md: Include constraints.md. Convert to satisfies_constraint. * config/i386/i386.c: Include tm-constrs.h. From-SVN: r112508
2006-03-29 23:07:12 +02:00
static bool gen_constrs;
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
static bool
parse_option (const char *opt)
{
if (!strcmp (opt, "-h"))
{
gen_header = true;
return 1;
}
genemit.c (main): Add tm-constrs.h to included headers. * genemit.c (main): Add tm-constrs.h to included headers. * genoutput.c (output_prologue): Add tm-constrs.h to included headers. * genpeep.c (main): Add tm-constrs.h to included headers. * genpreds.c (write_satisfies_constraint_fns): Rename to ... (write_tm_constrs_h): this and write complete file. (write_tm_preds_h): Do not emit satisfies_constraint fns. (write_insn_preds_c): Add tm-constrs.h to included headers. (gen_constrs): New variable. (parse_option): Parse "-c". (main): Invoke write_tm_constrs_h. * genrecog.c (write_header): Add tm-constrs.h to included headers. * Makefile.in (STAGECOPYSTUFF): Add tm-constrs.h. (object_out_file): Add tm-constrs.h dependency. (insn-emit.o): Same. (insn-output.o): Same. (insn-peep.o): Same. (insn-preds.o): Same. (insn-recog.o): Same. (tm-constsr.h): New target. (s-constrs-h): New target. * config/rs6000/constraints.md: New file. * config/rs6000/rs6000.c: Include tm-constrs.h. (num_insn_constant_wide): Convert to satisfies_constraint. (rs6000_rtx_costs): Convert to satisfies_constraint. * config/rs6000/rs6000.h (REG_CLASS_FROM_LETTER): Delete. (CONST_OK_FOR_LETTER_P): Delete. (CONST_DOUBLE_OK_FOR_LETTER_P): Delete. (EXTRA_CONSTRAINT): Delete. (EXTRA_MEMORY_CONSTRAINT): Delete. (EXTRA_ADDRESS_CONSTRAINT): Delete. * config/rs6000/predicates.md: Convert to satisfies_constraint. * config/rs6000/rs6000.md: Include constraints.md. Convert to satisfies_constraint. * config/i386/i386.c: Include tm-constrs.h. From-SVN: r112508
2006-03-29 23:07:12 +02:00
else if (!strcmp (opt, "-c"))
{
gen_constrs = true;
return 1;
}
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
else
return 0;
}
/* Master control. */
int
main (int argc, const char **argv)
{
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
progname = argv[0];
if (argc <= 1)
fatal ("no input file name");
Makefile.in (build/genmddeps.o): Depend on $(READ_MD_H). gcc/ * Makefile.in (build/genmddeps.o): Depend on $(READ_MD_H). * genmddeps.c: Include read-md.h. (main): Call init_rtx_reader_args instead of init_md_reader_args. * genattr.c (main): Likewise. * genattrtab.c (main): Likewise. * genautomata.c (main): Likewise. * gencodes.c (main): Likewise. * genconditions.c (main): Likewise. * genconfig.c (main): Likewise. * genconstants.c (main): Likewise. * genemit.c (main): Likewise. * genextract.c (main): Likewise. * genflags.c (main): Likewise. * genopinit.c (main): Likewise. * genoutput.c (main): Likewise. * genpeep.c (main): Likewise. * genrecog.c (main): Likewise. * genpreds.c (main): Likewise. * gensupport.h (in_fname): Move to read-md.h. (init_md_reader_args_cb): Rename to... (init_rtx_reader_args_cb): ...this and return a bool. (init_md_reader_args): Rename to... (init_rtx_reader_args): ...this and return a bool. (include_callback): Move to read-md.h. * gensupport.c (in_fname, include_callback, base_dir, max_include_len) (file_name_list, first_dir_md_include): Move to read-md.c (first_bracket_include): Delete unused variable. (last_dir_md_include): Move to read-md.c. (process_include): Delete, moving code to read-md.c:handle_include. (process_rtx): Don't handle INCLUDE. (save_string): Delete. (rtx_handle_directive): New function. (init_md_reader_args_cb): Rename to... (init_rtx_reader_args_cb): ...this and return a boolean success value. Use read_md_args. (init_md_reader_args): Rename to... (init_rtx_reader_args): ...this and return a boolean success value. * rtl.def (INCLUDE): Delete. * rtl.h (read_rtx): Remove "int *" argument. Add "const char *" argument. * read-rtl.c (read_conditions): Don't gobble ')' here. (read_mapping): Likewise. (read_rtx): Remove LINENO argument. Add RTX_NAME argument. Handle top-level non-rtx constructs here rather than in read_rtx_1. Store the whole queue in *X. Remove call to init_md_reader. (read_rtx_1): Rename to... (read_rtx_code): ...this. Call read_nested_rtx to read subrtxes. Don't handle top-level non-rtx constructs here. Don't handle (nil) here. (read_nested_rtx): New function. Handle (nil) here rather than in read_rtx_code. (read_rtx_variadic): Call read_nested_rtx to read subrtxes. Don't gobble ')' here. * read-md.h (directive_handler_t): New type. (in_fname, include_callback): Moved from read-md.h. (read_constants, init_md_reader): Delete. (read_md_files): Declare. * read-md.c (file_name_list, in_fname, base_dir, first_dir_md_include) (last_dir_md_include_ptr, include_callback, max_include_len): Moved from gensupport.c. (read_constants): Rename to... (handle_constants): ...this. Don't gobble ')' here. (handle_include, handle_file, handle_toplevel_file) (parse_include): New functions, mostly taken from gensupport.c. (init_md_reader): Subsume into... (read_md_files): ...this new function. From-SVN: r160577
2010-06-10 22:23:13 +02:00
if (!init_rtx_reader_args_cb (argc, argv, parse_option))
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
return FATAL_EXIT_CODE;
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
md_rtx_info info;
while (read_md_rtx (&info))
switch (GET_CODE (info.def))
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
{
case DEFINE_PREDICATE:
case DEFINE_SPECIAL_PREDICATE:
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
process_define_predicate (&info);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
break;
case DEFINE_CONSTRAINT:
case DEFINE_MEMORY_CONSTRAINT:
re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
2016-01-29 19:47:17 +01:00
case DEFINE_SPECIAL_MEMORY_CONSTRAINT:
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
case DEFINE_ADDRESS_CONSTRAINT:
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
process_define_constraint (&info);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
break;
case DEFINE_REGISTER_CONSTRAINT:
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
process_define_register_constraint (&info);
* rtl.def (define_constraint, define_register_constraint) (define_memory_constraint, define_address_constraint): New MD forms. * gensupport.c (process_rtx): Put define_constraint etc on the predicate queue. * genpreds.c (process_define_predicate): Adjust comment. Validate the name, and call validate_exp to validate the expression. (mark_mode_tests, write_extract_subexp): Can assume correct input. (write_predicate_expr): Likewise. NAME argument no longer necessary; all callers changed. (validate_exp, needs_variable, struct constraint_data) (constraints_by_letter_table, first_constraint, last_constraint_ptr) (FOR_ALL_CONSTRAINTS, generic_constraint_letters, const_int_constraints) (const_dbl_constraints, constraint_max_namelen) (have_register_constraints, have_memory_constraints) (have_address_constraints, have_address_constraints) (have_extra_constraints, have_const_int_constraints) (have_const_dbl_constraints, mangle, add_constraint) (process_define_constraint, process_define_register_constraint) (write_enum_constraint_num, write_lookup_constraint) (write_insn_constraint_len, write_regclass_for_constraint) (write_constraint_satisfied_p, write_insn_const_int_ok_for_constraint) (write_insn_extra_memory_constraint) (write_insn_extra_address_constraint) (write_satisfies_constraint_fns): New. (write_tm_preds_h): If we have new-style constraint definitions, prototype the functions generated from them, and define the old constraint interface (still used by generic code) in terms of those functions. (write_insn_preds_c): If we have new-style constraint definitions, generate all relevant functions from those definitions. (main): Handle define_constraint etc. * genoutput.c (struct constraint_data, indep_constraints) (mdep_constraint_letters, constraints_by_letter_table, note_constraint) (mdep_constraint_len): New data structures and functions, defined #ifdef USE_MD_CONSTRAINTS. (check_constraint_len): Don't define #ifdef USE_MD_CONSTRAINTS. (validate_insn_alternatives): If USE_MD_CONSTRAINTS is defined, use new logic to validate operand constraints against constraint definitions. (main): Process define_constraint etc. if USE_MD_CONSTRAINTS is defined. * defaults.h: If none of the old-style constraint macros are defined, define USE_MD_CONSTRAINTS; do not provide defaults for any old-style macros; and poison REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, and EXTRA_CONSTRAINT. * recog.c (reg_fits_class_p): If cl is NO_REGS, return 0 immediately. * doc/md.texi: Document new constraint-definition mechanism and the C interface it provides. Remove references to old mechanism elsewhere in the document. (Machine Constraints): Use pathnames relative to gcc directory, i.e. config/ARCH/FILE. Change i386 section to refer to config/i386/predicates.md; update that section to match docstrings. * doc/tm.texi: Move all documentation of the old constraint- definition macros to their own section, clearly mark as obsolete. * config/i386/predicates.md (R, q, Q, l, a, b, c, d, S, D, A, f, t) (u, y, x, Y, I, J, K, L, M, N, O, G, C, e, Z): New constraint definitions. * config/i386/i386.h (REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P) (CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Delete. * config/i386/i386.md (*movdf_nointeger): Remove stray 'H' from constraint strings. (splits and peepholes): Use satisfies_constraint_*. * config/i386/i386.c (memory_address_length) (ix86_attr_length_immediate_default): Use satisfies_constraint_*. From-SVN: r111508
2006-02-28 04:28:18 +01:00
break;
default:
break;
}
choose_enum_order ();
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
if (gen_header)
write_tm_preds_h ();
genemit.c (main): Add tm-constrs.h to included headers. * genemit.c (main): Add tm-constrs.h to included headers. * genoutput.c (output_prologue): Add tm-constrs.h to included headers. * genpeep.c (main): Add tm-constrs.h to included headers. * genpreds.c (write_satisfies_constraint_fns): Rename to ... (write_tm_constrs_h): this and write complete file. (write_tm_preds_h): Do not emit satisfies_constraint fns. (write_insn_preds_c): Add tm-constrs.h to included headers. (gen_constrs): New variable. (parse_option): Parse "-c". (main): Invoke write_tm_constrs_h. * genrecog.c (write_header): Add tm-constrs.h to included headers. * Makefile.in (STAGECOPYSTUFF): Add tm-constrs.h. (object_out_file): Add tm-constrs.h dependency. (insn-emit.o): Same. (insn-output.o): Same. (insn-peep.o): Same. (insn-preds.o): Same. (insn-recog.o): Same. (tm-constsr.h): New target. (s-constrs-h): New target. * config/rs6000/constraints.md: New file. * config/rs6000/rs6000.c: Include tm-constrs.h. (num_insn_constant_wide): Convert to satisfies_constraint. (rs6000_rtx_costs): Convert to satisfies_constraint. * config/rs6000/rs6000.h (REG_CLASS_FROM_LETTER): Delete. (CONST_OK_FOR_LETTER_P): Delete. (CONST_DOUBLE_OK_FOR_LETTER_P): Delete. (EXTRA_CONSTRAINT): Delete. (EXTRA_MEMORY_CONSTRAINT): Delete. (EXTRA_ADDRESS_CONSTRAINT): Delete. * config/rs6000/predicates.md: Convert to satisfies_constraint. * config/rs6000/rs6000.md: Include constraints.md. Convert to satisfies_constraint. * config/i386/i386.c: Include tm-constrs.h. From-SVN: r112508
2006-03-29 23:07:12 +02:00
else if (gen_constrs)
write_tm_constrs_h ();
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
else
write_insn_preds_c ();
genpreds.c: Add capability to generate predicate bodies as well as function prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-12 09:49:00 +02:00
if (have_error || ferror (stdout) || fflush (stdout) || fclose (stdout))
return FATAL_EXIT_CODE;
return SUCCESS_EXIT_CODE;
}