Skip to content

Commit ac421ac

Browse files
Hans-Peter NilssonHans-Peter Nilsson
authored andcommitted
defaults.h: Default MAX_FIXED_MODE_SIZE to MAX (BITS_PER_WORD * 2, 64)
The old GET_MODE_SIZE (DImode) (i.e. 64) made sense before 64-bitters. Now the default is just a trap: when using the default 64, things like TImode (128 bits) still mostly works, but general corner cases related to computing large-size objects numbers, like (1 << 64)/8 break, as exposed by gcc.dg/pr105094.c. So, keep the floor at 64 for 32-bitters and smaller targets, but for larger targets, make it 2 * BITS_PER_WORD. Also, express it more directly with focus on BITS_PER_WORD, not the size of a mode. Add "by GCC internally" in an attempt to tell that this is when gcc cooks something up, not when plain input uses a type with such a mode. * defaults.h (MAX_FIXED_MODE_SIZE): Default to 2 * BITS_PER_WORD for larger-than-32-bitters. * doc/tm.texi.in (MAX_FIXED_MODE_SIZE): Adjust accordingly. Tweak wording. * doc/tm.texi: Regenerate.
1 parent 490c2c8 commit ac421ac

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

gcc/defaults.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
11581158
#endif
11591159

11601160
#ifndef MAX_FIXED_MODE_SIZE
1161-
#define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
1161+
#define MAX_FIXED_MODE_SIZE MAX (BITS_PER_WORD * 2, 64)
11621162
#endif
11631163

11641164
/* Nonzero if structures and unions should be returned in memory.

gcc/doc/tm.texi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,10 +1424,10 @@ the smaller of @var{computed} and @code{BIGGEST_ALIGNMENT}
14241424

14251425
@defmac MAX_FIXED_MODE_SIZE
14261426
An integer expression for the size in bits of the largest integer
1427-
machine mode that should actually be used. All integer machine modes of
1428-
this size or smaller can be used for structures and unions with the
1429-
appropriate sizes. If this macro is undefined, @code{GET_MODE_BITSIZE
1430-
(DImode)} is assumed.
1427+
machine mode that should actually be used by GCC internally.
1428+
All integer machine modes of this size or smaller can be used for
1429+
structures and unions with the appropriate sizes. If this macro is
1430+
undefined, @code{MAX (BITS_PER_WORD * 2, 64)} is assumed.
14311431
@end defmac
14321432

14331433
@defmac STACK_SAVEAREA_MODE (@var{save_level})

gcc/doc/tm.texi.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,10 +1251,10 @@ the smaller of @var{computed} and @code{BIGGEST_ALIGNMENT}
12511251

12521252
@defmac MAX_FIXED_MODE_SIZE
12531253
An integer expression for the size in bits of the largest integer
1254-
machine mode that should actually be used. All integer machine modes of
1255-
this size or smaller can be used for structures and unions with the
1256-
appropriate sizes. If this macro is undefined, @code{GET_MODE_BITSIZE
1257-
(DImode)} is assumed.
1254+
machine mode that should actually be used by GCC internally.
1255+
All integer machine modes of this size or smaller can be used for
1256+
structures and unions with the appropriate sizes. If this macro is
1257+
undefined, @code{MAX (BITS_PER_WORD * 2, 64)} is assumed.
12581258
@end defmac
12591259

12601260
@defmac STACK_SAVEAREA_MODE (@var{save_level})

0 commit comments

Comments
 (0)