diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-15 21:57:21 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-15 21:57:21 +0000 |
commit | f58875bf6cd1b685e19135d81c7cc5e121111f18 (patch) | |
tree | 904f83fb53c1f8a9c252a65c246a7ba6a8688cde /gcc/machmode.def | |
parent | f0873ccc00cf73b81a5267f3eb78eb4cb3a9ab39 (diff) | |
download | gcc-f58875bf6cd1b685e19135d81c7cc5e121111f18.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72534 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/machmode.def')
-rw-r--r-- | gcc/machmode.def | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/machmode.def b/gcc/machmode.def index 72b1ec83644..0b762497d00 100644 --- a/gcc/machmode.def +++ b/gcc/machmode.def @@ -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. */ |