aboutsummaryrefslogtreecommitdiff
path: root/gcc/genmodes.c
AgeCommit message (Collapse)AuthorFilesLines
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-06-01errors.h (warning, [...]): Add printf attribute.Kaveh R. Ghazi1-1/+1
* errors.h (warning, error, fatal, internal_error): Add printf attribute. * genmodes.c (make_vector_mode): Fix format arguments. From-SVN: r100421
2005-05-31expr.c (convert_move): When a partial_int requires multiple conversion steps...DJ Delorie1-1/+36
* expr.c (convert_move): When a partial_int requires multiple conversion steps, make sure successive steps convert the intermediate value, not the original value. * expmed.c (expand_mult): Convert partial_int multiplies to shift/add combinations too. * genmodes.c (mode_data): Add wider_2x. (calc_wider_mode): Calculate twice-wider mode too. (emit_mode_wider): Emit twice-wider mode too. * machmode.h (mode_2xwider, GET_MODE_2XWIDER_MODE): New. * expr.c (expand_expr_real_1): Use it for expanding multiplies. From-SVN: r100414
2004-10-15bitmap.c, [...]: Update copyright.Kazu Hirata1-1/+1
* bitmap.c, bitmap.h, builtin-attrs.def, cfglayout.h, collect2.h, conflict.c, coretypes.h, coverage.h, errors.h, gcc.h, gcov-dump.c, gen-protos.c, gencheck.c, gencodes.c, genconstants.c, gengenrtl.c, genmodes.c, genpeep.c, gensupport.h, graph.h, gthr-gnat.c, gthr-gnat.h, gthr-posix.c, gthr-posix.h, hard-reg-set.h, hwint.h, integrate.h, libgcc2.c, lists.c, machmode.def, mips-tdump.c, opts.h, params.c, predict.def, predict.h, protoize.c, reload.h, resource.h, rtl-error.c, sbitmap.c, sbitmap.h, sreal.c, tlink.c, tree-dump.h, tree-inline.h, unwind-dw2-fde.c, unwind-dw2.c, unwind-sjlj.c, value-prof.h: Update copyright. From-SVN: r89097
2004-09-09Makefile.in (gengtype): Use $(BUILD_ERRORS).Nathan Sidwell1-1/+1
* 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-07-26basic-block.h (reorder_block_def): Rename to reorder_block_def_p.Bernardo Innocenti1-1/+1
* basic-block.h (reorder_block_def): Rename to reorder_block_def_p. * c-common.c: Add missing casts from void * to other types. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-pragma.c: Likewise. * c-typeck.c: Likewise. * defaults.h: Likewise. * genconstants.c: Likewise. * gengtype-lex.l: Likewise. * genmodes.c: Likewise. * read-rtl.c: Likewise. * rtl.c: Likewise. From-SVN: r85166
2004-07-25bitmap.c: Use type-safe memory allocation macros from libiberty.Bernardo Innocenti1-1/+1
* bitmap.c: Use type-safe memory allocation macros from libiberty. * c-common.c: Likewise. * c-decl.c: Likewise. * c-lang.c: Likewise. * c-lex.c: Likewise. * c-opts.c: Likewise. * c-parse.in: Likewise. * c-typeck.c: Likewise. * genconditions.c: Likewise. * gengtype-lex.l: Likewise. * gengtype-yacc.y: Likewise. * gengtype.c: Likewise. * genmodes.c: Likewise. * gensupport.c: Likewise. * read-rtl.c: Likewise. * read-rtl.c (read_constants): Use INSERT instead of TRUE in call to htab_find_slot(). From-SVN: r85163
2004-07-25c-common.c: Rename all identifiers named `class' to `cl'.Bernardo Innocenti1-58/+58
* c-common.c: Rename all identifiers named `class' to `cl'. * c-decl.c: Likewise. * c-common.h: Likewise. * c-parse.in: Likewise. * c-typeck.c: Likewise. * genmodes.c: Likewise. * real.c: Likewise. * real.h: Likewise. * recog.c: Likewise. * recog.h: Likewise. * regrename.c: Likewise. * tree.h: Likewise. From-SVN: r85153
2004-07-24* genmodes.c (make_vector_modes): Mark with ATTRIBUTE_UNUSED.Zack Weinberg1-1/+1
From-SVN: r85113
2003-11-06genmodes.c: Change the word "bitsize" to "precision" throughout.Zack Weinberg1-34/+34
* genmodes.c: Change the word "bitsize" to "precision" throughout. * machmode.def: Likewise. * machmode.h (GET_MODE_SIZE): Cast value to unsigned short. (GET_MODE_BITSIZE): Define as GET_MODE_SIZE * BITS_PER_UNIT. (GET_MODE_PRECISION): New macro. (mode_bitsize): Renamed mode_precision. * stor-layout.c (mode_for_size, smallest_mode_for_size): Use GET_MODE_PRECISION; clarify comments. ada: * misc.c (fp_prec_to_size, fp_size_to_prec): Use GET_MODE_PRECISION and update for changed meaning of GET_MODE_BITSIZE. From-SVN: r73295
2003-10-29genmodes.c (complete_mode): Record MODE_CC...Zack Weinberg1-3/+3
* genmodes.c (complete_mode): Record MODE_CC, MODE_INT, MODE_FLOAT, and MODE_PARTIAL_INT modes as having one component, not zero. From-SVN: r73051
2003-10-25genmodes.c (struct mode_data): Add contained and next_cont fields.Zack Weinberg1-18/+91
* genmodes.c (struct mode_data): Add contained and next_cont fields. (complete_mode): Maintain linked list of modes that have a given component. (emit_mode_unit_size): Delete. (emit_mode_nunits): New. (emit_insn_modes_c): Update to match. (emit_mode_adjustments): Propagate size and alignment adjustments from component modes to their containers. * machmode.h (mode_unit_size): Delete. (mode_nunits): New. (GET_MODE_NUNITS): Just return the value in the table. (GET_MODE_UNIT_SIZE): Compute using GET_MODE_INNER and GET_MODE_SIZE. * expmed.c (store_bit_field, extract_bit_field): Can use a plain move instruction if bitsize >= GET_MODE_BITSIZE of destination/source mode, respectively. * varasm.c (assemble_real): Write out the full size of the constant, not just its bitsize. (output_constant): Honor TYPE_MODE of TREE_REAL_CSTs. * config/ia64/ia64-modes.def: Define XFmode as well as TFmode. Use ADJUST_BYTESIZE and ADJUST_ALIGNMENT to set size and alignment of XF and TF modes in compliance with ia64 ABIs. Can now hardwire the format of both modes. * config/ia64/ia64.c: Change TFmode to XFmode wherever appropriate. (general_tfmode_operand, destination_tfmode_operand) (tfreg_or_fp01_operand, spill_tfmode_operand): Rename to general_xfmode_operand, destination_xfmode_operand, xfreg_or_fp01_operand, spill_xfmode_operand respectively. (ia64_init_builtins): Make TYPE_PRECISION of fpreg_type and float80_type be 96 so they get XFmode. Use !TARGET_HPUX, not INTEL_EXTENDED_IEEE_FORMAT, to decide how to define __float128. * config/ia64/ia64.h: Default TARGET_HPUX to 0. Change TFmode to XFmode wherever appropriate. Remove all references to INTEL_EXTENDED_IEEE_FORMAT. (LONG_DOUBLE_TYPE_SIZE): Varies with TARGET_HPUX. (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define (always 96). (PREDICATE_CODES): Update to match function renames. * config/ia64/ia64.md: Change TF to XF throughout; rename all patterns to match. Remove all references to INTEL_EXTENDED_IEEE_FORMAT. Update predicate calls to match function renames. * config/ia64/ia64-protos.c: Update all prototypes to match renamed functions. * config/ia64/hpux.h: Redefine TARGET_HPUX to 1. Remove all references to INTEL_EXTENDED_IEEE_FORMAT. * config/ia64/lib1funcs.asm: Add __divxf3 as new name for __divtf3; keep old name for backward compatibility. (L__compat): New section providing forwarding stubs for __fixtfti, __fixunstfti, __floattitf. * config/ia64/t-ia64: Add __compat to LIB1ASMFUNCS. From-SVN: r72916
2003-10-15Remove stray blank lineZack Weinberg1-1/+0
From-SVN: r72535
2003-10-15genmodes.c: Include hashtab.h.Zack Weinberg1-43/+201
* genmodes.c: Include hashtab.h. (modes_by_name, hash_mode, eq_mode, struct mode_adjust) (adj_bytesize, adj_alignment, adj_format, new_adjust) (_ADD_ADJUST, ADJUST_BYTESIZE, ADJUST_ALIGNMENT, ADJUST_FORMAT) (print_maybe_const_decl, emit_mode_adjustments): New. (known_modes): Rename to modes. (find_mode): Kill class argument; look up in hash table. (new_mode): Insert into hash table also. (new_adjust): New. (reset_float_format, make_partial_integer_mode) (make_vector_mode): Tweak error reporting. (reset_float_format): Correct type of fourth argument. (emit_insn_modes_h): Add #defines to help make mode_size, mode_base_align, and real_format_for_mode conditionally const. (emit_mode_size, emit_mode_base_align): Use print_maybe_const_decl. (emit_real_format_for_mode): Likewise, but temporarily disabled. (emit_insn_modes_c): Call emit_mode_adjustments. (main): Initialize modes_by_name. * Makefile.in: Update dependencies. * machmode.def: Document EXPR arguments and new ADJUST_* statements. * machmode.h: Use CONST_MODE_SIZE and CONST_MODE_BASE_ALIGN in declarations of mode_size and mode_base_align. Declare init_adjust_machine_modes. * toplev.c (backend_init): Call init_adjust_machine_modes. From-SVN: r72534
2003-10-15genmodes.c (calc_wider_mode): Allocate enough room for all the entries we'll ↵Olivier Hainque1-1/+3
possibly assign in the sort buffer. * genmodes.c (calc_wider_mode): Allocate enough room for all the entries we'll possibly assign in the sort buffer. From-SVN: r72531
2003-10-13Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with ↵Zack Weinberg1-24/+104
min-insn-modes.o. * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. (STAGESTUFF): Add min-insn-modes.c. (genobjs): Add genmodes.o. (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. (min-insn-modes.c, min-insn-modes.o): New rules. (s-modes): Also generate min-insn-modes.c. ($(BUILD_PREFIX_1)insn-modes.o): Kill. * genmodes.c (struct mode_data): Add format field. (blank_mode, validate_mode, complete_mode): Update to match. (make_scalar_mode): Separate into make_int_mode and make_float_mode. (_SCALAR_MODE): Kill. (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. (emit_insn_modes_c_header): Adjust. (emit_min_insn_modes_c_header, emit_real_format_for_mode) (emit_min_insn_modes_c): New functions. (emit_insn_modes_c): Call emit_real_format_for_mode. (main): Add -m option to generate min-insn-modes.c. * machmode.h: Update documentation. Add format argument to all uses of FLOAT_MODE. * real.c: Don't define real_format_for_mode here. * dwarfout.c: Move default definition of PRINT_REG... * defaults.h: ...here. * print-rtl.c: Include tm_p.h. (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): Kill. (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround this entire block with #ifndef GENERATOR_FILE. * regclass.c: Unconditionally define reg_names. * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h Don't define DEBUG_REGISTER_NAMES. * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in redefinition of REGISTER_NAMES. * config/i386/i386.h: Don't define DEBUG_PRINT_REG. * combine.c: Change all preprocessor conditionals on EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit for clarity. * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. * configure.in: Don't define EXTRA_CC_MODES. * configure, config.in: Regenerate. * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: May assume that GET_MODE_CLASS is accurate for extra CC modes at all times. * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct number of arguments to aggregate_value_p. * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. * machmode.def: Explain ARCH-modes.def. Document RESET_FLOAT_FORMAT. Improve commentary on various mode clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, XF, or TF modes here. Remove backward-compatibility definition of CC. * config/alpha/alpha-modes.def: New file; define TF mode. * config/arc/arm-modes.def: Define XF mode. * config/c4x/c4x-modes.def: Define QF and HF modes. Unset float format for SF and DF modes. * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. * config/i386/i386-modes.def: Define XF and TF modes. * config/i960/i960-modes.def: Define TF mode. * config/ia64/ia64-modes.def: Define TF and OI modes. * config/m68k/m68k-modes.def: New file; define XF mode. * config/mips/mips-modes.def: New file; define TF mode, reset formats for SF and DF modes. * config/pa/pa-modes.def: Define TF mode. * config/rs6000/rs6000.c: Define TF and PSI modes. * config/s390/s390-modes.def: Define OI mode. * config/sh/sh-modes.def: New file; define PSI mode. * config/sparc/sparc-modes.def: Define TF mode. * config/vax/vax-modes.def: New file; reset formats for SF and DF modes. * config/c4x/c4x.c (c4x_override_options): No need to mess with real_format_for_mode or set REAL_MODE_FORMATs. (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx variable. * config/i386/i386.c (override_options): No need to set REAL_MODE_FORMATs here. * config/i960/i960.c (i960_initialize): Likewise. * config/m68k/m68k.c (m68k_override_options): Likewise. * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT for TFmode only if not the default. * config/mips/mips.c (override_options): Likewise. * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for DFmode only if not the default. * config/i370/i370.h (RET_REG): Don't consider TFmode. * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use of modes that don't appear anywhere in the machine description. * config/arc/arc-modes.def, config/arm/arm-modes.def * config/c4x/c4x-modes.def, config/frv/frv-modes.def * config/i386/i386-modes.def, config/i960/i960-modes.def * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def * config/sparc/sparc-modes.def: Convert to new style for declaring extra CC modes. From-SVN: r72440
2003-10-11+2003-10-11 Andrew Pinski <pinskia@physics.uc.edu>Andrew Pinski1-4/+4
+ + * genmodes.c (emit_mode_mask) Change MASK to MODE_MASK. From-SVN: r72333
2003-10-10genmodes.c, [...]: New files.Zack Weinberg1-0/+908
* genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313