===================================================================
@@ -1509,7 +1509,12 @@ compute integer values.
@findex MAX_BITSIZE_MODE_ANY_MODE
@item MAX_BITSIZE_MODE_ANY_MODE
-The bitsize of the largest mode on the target.
+The bitsize of the largest mode on the target. The default value is
+the largest mode size given in the mode definition file, which is
+always correct for targets whose modes have a fixed size. Targets
+that might increase the size of a mode beyond this default should define
+@code{MAX_BITSIZE_MODE_ANY_MODE} to the actual upper limit in
+@file{@var{machine}-modes.def}.
@end table
@findex byte_mode
===================================================================
@@ -792,6 +792,7 @@ #define ADJUST_FBIT(M, X) _ADD_ADJUST (
static int bits_per_unit;
static int max_bitsize_mode_any_int;
+static int max_bitsize_mode_any_mode;
static void
create_modes (void)
@@ -811,6 +812,12 @@ create_modes (void)
#else
max_bitsize_mode_any_int = 0;
#endif
+
+#ifdef MAX_BITSIZE_MODE_ANY_MODE
+ max_bitsize_mode_any_mode = MAX_BITSIZE_MODE_ANY_MODE;
+#else
+ max_bitsize_mode_any_mode = 0;
+#endif
}
#ifndef NUM_POLY_INT_COEFFS
@@ -989,12 +996,18 @@ emit_max_int (void)
else
printf ("#define MAX_BITSIZE_MODE_ANY_INT %d\n", max_bitsize_mode_any_int);
- mmax = 0;
- for (j = 0; j < MAX_MODE_CLASS; j++)
- for (i = modes[j]; i; i = i->next)
- if (mmax < i->bytesize)
- mmax = i->bytesize;
- printf ("#define MAX_BITSIZE_MODE_ANY_MODE (%d*BITS_PER_UNIT)\n", mmax);
+ if (max_bitsize_mode_any_mode == 0)
+ {
+ mmax = 0;
+ for (j = 0; j < MAX_MODE_CLASS; j++)
+ for (i = modes[j]; i; i = i->next)
+ if (mmax < i->bytesize)
+ mmax = i->bytesize;
+ printf ("#define MAX_BITSIZE_MODE_ANY_MODE (%d*BITS_PER_UNIT)\n", mmax);
+ }
+ else
+ printf ("#define MAX_BITSIZE_MODE_ANY_MODE %d\n",
+ max_bitsize_mode_any_mode);
}
/* Emit mode_size_inline routine into insn-modes.h header. */