Commit Graph

60 Commits

Author SHA1 Message Date
Zack Weinberg 4c61a9fd7b * genmodes.c (make_vector_modes): Mark with ATTRIBUTE_UNUSED.
From-SVN: r85113
2004-07-24 06:26:50 +00:00
Zack Weinberg 37783865bd genmodes.c: Change the word "bitsize" to "precision" throughout.
* 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-11-06 08:38:52 +00:00
Zack Weinberg 9fcc6bf64a genmodes.c (complete_mode): Record MODE_CC...
* 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-29 17:01:27 +00:00
Zack Weinberg 02befdf47f genmodes.c (struct mode_data): Add contained and next_cont fields.
* 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-25 02:03:40 +00:00
Zack Weinberg 6492b8d80d Remove stray blank line
From-SVN: r72535
2003-10-15 22:06:16 +00:00
Zack Weinberg b8eaca232b genmodes.c: Include hashtab.h.
* 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-15 21:57:21 +00:00
Olivier Hainque 0f229b22bb genmodes.c (calc_wider_mode): Allocate enough room for all the entries we'll 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-15 17:24:44 +00:00
Zack Weinberg 94134f429f Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with 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-13 21:16:33 +00:00
Andrew Pinski 379f1861d3 +2003-10-11 Andrew Pinski <pinskia@physics.uc.edu>
+
+       * genmodes.c (emit_mode_mask) Change MASK to MODE_MASK.

From-SVN: r72333
2003-10-11 00:22:22 -07:00
Zack Weinberg 0974c7d70d genmodes.c, [...]: New files.
* 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
2003-10-10 20:33:07 +00:00