Commit b8eaca23 by Zack Weinberg

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
parent 0f229b22
2003-10-15 Zack Weinberg <zack@codesourcery.com>
* 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.
2003-10-15 Olivier Hainque <hainque@act-europe.fr>
* genmodes.c (calc_wider_mode): Allocate enough room for all the
entries we'll possibly assign in the sort buffer.
2003-10-15 Ulrich Weigand <uweigand@de.ibm.com>
* config.gcc (s390x-ibm-tpf*): New target.
......@@ -50,13 +77,13 @@
New functions.
* config/s390/s390.h (PREDICATE_CODES): Add s390_alc_comparison
and s390_slb_comparison.
* config/s390/s390.md ("*adddi3_31", "*subdi3_31"): Do not use on
* config/s390/s390.md ("*adddi3_31", "*subdi3_31"): Do not use on
zSeries machines.
("*adddi3_31z", "*subdi3_31z"): New insns.
("*adddi3_alc_cc", "*adddi3_alc", "*subdi3_slb_cc", "*subdi3_slb",
"*addsi3_alc_cc", "*addsi3_alc", "*subsi3_slb_cc", "*subsi3_slb"):
New insns.
2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
* configure.in: Clean up some feedback echoes.
......@@ -76,7 +103,7 @@
* config/s390/s390.md ("muldf3", "*muldf3", "*muldf3_ibm",
"mulsf3", "*mulsf3", "*mulsf3_ibm"): Do not clobber CC.
("divdf3", "*divdf3", "*divdf3_ibm", "divsf3", "*divsf3",
("divdf3", "*divdf3", "*divdf3_ibm", "divsf3", "*divsf3",
"*divsf3_ibm"): Likewise.
2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
......@@ -103,7 +130,7 @@
* fixinc/inclhack.def (alpha_pthread_gcc): New fix.
* fixinc/fixincl.x: Regenerate.
* fixinc/tests/base/pthread.h [ALPHA_PTHREAD_GCC_CHECK]: New
testcase.
testcase.
Fixes PR bootstrap/9330.
2003-10-13 Eric Christopher <echristo@redhat.com>
......
......@@ -2198,8 +2198,8 @@ genmodes$(build_exeext) : genmodes.o $(BUILD_ERRORS) $(BUILD_LIBDEPS)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ \
genmodes.o $(BUILD_ERRORS) $(BUILD_LIBS)
genmodes.o : genmodes.c $(BCONFIG_H) $(SYSTEM_H) errors.h machmode.def \
$(extra_modes_file)
genmodes.o : genmodes.c $(BCONFIG_H) $(SYSTEM_H) errors.h $(HASHTAB_H) \
machmode.def $(extra_modes_file)
genpreds$(build_exeext) : genpreds.o $(BUILD_LIBDEPS)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ \
......
......@@ -51,7 +51,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
constant.
A FORMAT argument must be one of the real_mode_format structures
declared in real.h, or else a literal 0.
declared in real.h, or else a literal 0. Do not put a leading &
on the argument.
An EXPR argument must be a syntactically valid C expression.
If an EXPR contains commas, you may need to write an extra pair of
parentheses around it, so it appears to be a single argument to the
statement.
This file defines only those modes which are of use on almost all
machines. Other modes can be defined in the target-specific
......@@ -120,6 +126,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
error if there is no 'F'. For INT modes, the names are
derived by prefixing a C to the name.
ADJUST_BYTESIZE (MODE, EXPR);
ADJUST_ALIGNMENT (MODE, EXPR);
ADJUST_FLOAT_FORMAT (MODE, EXPR);
Arrange for the byte size, alignment, or floating point format
of MODE to be adjustable at run time. EXPR will be executed
once after processing all command line options, and should
evaluate to the desired byte size, alignment, or format.
Unlike a FORMAT argument, if you are adjusting a float format
you must put an & in front of the name of each format structure.
Note: If a mode is ever made which is more than 255 bytes wide,
machmode.h and genmodes.c will have to be changed to allocate
more space for the mode_size and mode_alignment arrays. */
......
......@@ -78,7 +78,7 @@ extern const unsigned char mode_class[NUM_MACHINE_MODES];
/* Get the size in bytes of an object of mode MODE. */
extern const unsigned char mode_size[NUM_MACHINE_MODES];
extern CONST_MODE_SIZE unsigned char mode_size[NUM_MACHINE_MODES];
#define GET_MODE_SIZE(MODE) mode_size[MODE]
/* Get the size in bytes of the basic parts of an object of mode MODE. */
......@@ -139,7 +139,7 @@ extern enum machine_mode get_best_mode (int, int, unsigned int,
/* Determine alignment, 1<=result<=BIGGEST_ALIGNMENT. */
extern const unsigned char mode_base_align[NUM_MACHINE_MODES];
extern CONST_MODE_BASE_ALIGN unsigned char mode_base_align[NUM_MACHINE_MODES];
extern unsigned get_mode_alignment (enum machine_mode);
......@@ -157,4 +157,7 @@ extern enum machine_mode byte_mode;
extern enum machine_mode word_mode;
extern enum machine_mode ptr_mode;
/* Target-dependent machine mode initialization - in insn-modes.c. */
extern void init_adjust_machine_modes (void);
#endif /* not HAVE_MACHINE_MODES */
......@@ -4365,6 +4365,8 @@ process_options (void)
static void
backend_init (void)
{
init_adjust_machine_modes ();
init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL
|| debug_info_level == DINFO_LEVEL_VERBOSE
#ifdef VMS_DEBUGGING_INFO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment