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
This commit is contained in:
parent
6c748c6c99
commit
37783865bd
@ -1,3 +1,14 @@
|
||||
2003-11-06 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2003-11-05 Joseph S. Myers <jsm@polyomino.org.uk>
|
||||
|
||||
* doc/install-old.texi: Remove old documentation of building
|
||||
|
@ -1,9 +1,14 @@
|
||||
2003-11-06 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* misc.c (fp_prec_to_size, fp_size_to_prec): Use GET_MODE_PRECISION
|
||||
and update for changed meaning of GET_MODE_BITSIZE.
|
||||
|
||||
2003-11-04 Doug Rupp <rupp@gnat.com>
|
||||
|
||||
* sysdep.c: Problem discovered during IA64 VMS port.
|
||||
[VMS] #include <unixio.h> to get proper prototypes.
|
||||
|
||||
* adaint.c:
|
||||
* adaint.c:
|
||||
Issues discovered/problems fixed during IA64 VMS port.
|
||||
[VMS] #define _POSIX_EXIT for proper semantics.
|
||||
[VMS] #include <unixio.h> for proper prototypes.
|
||||
@ -17,7 +22,7 @@
|
||||
* ada-tree.h (TYPE_DIGITS_VALUE, SET_TYPE_DIGITS_VALUE): Save count as
|
||||
tree, not integer.
|
||||
|
||||
* decl.c:
|
||||
* decl.c:
|
||||
(gnat_to_gnu_entity, case E_Floating_Point_Type): Save count as tree,
|
||||
not integer.
|
||||
|
||||
@ -25,7 +30,7 @@
|
||||
gigi.h (fp_prec_to_size, fp_size_to_prec): Temporary
|
||||
routines to work around change in FP sizing semantics in GCC.
|
||||
|
||||
* utils.c:
|
||||
* utils.c:
|
||||
(build_vms_descriptor): TYPE_DIGITS_VALUE is tree, not integer.
|
||||
|
||||
* gigi.h: (enumerate_modes): New function.
|
||||
@ -44,22 +49,22 @@
|
||||
|
||||
* einfo.ads, einfo.adb: Add new flag Is_Thread_Body
|
||||
|
||||
* exp_ch6.adb:
|
||||
* exp_ch6.adb:
|
||||
(Expand_N_Subprogram_Body): Handle expansion of thread body procedure
|
||||
|
||||
* par-prag.adb: Add dummy entry for Thread_Body pragma
|
||||
|
||||
* rtsfind.ads:
|
||||
* rtsfind.ads:
|
||||
Add entries for System.Threads entities for thread body processing
|
||||
|
||||
* sem_attr.adb:
|
||||
* sem_attr.adb:
|
||||
(Analyze_Pragma, Access attributes): Check these are not applied to a
|
||||
thread body, since this is not permitted
|
||||
|
||||
* sem_prag.adb: Add processing for Thread_Body pragma.
|
||||
Minor comment fix.
|
||||
|
||||
* sem_res.adb:
|
||||
* sem_res.adb:
|
||||
(Resolve_Call): Check for incorrect attempt to call a thread body
|
||||
procedure with a direct call.
|
||||
|
||||
@ -76,7 +81,7 @@
|
||||
|
||||
2003-11-04 Javier Miranda <miranda@gnat.com>
|
||||
|
||||
* sem_ch10.adb:
|
||||
* sem_ch10.adb:
|
||||
(Build_Limited_Views): Return after posting an error in case of limited
|
||||
with_clause on subprograms, generics, instances or generic renamings
|
||||
(Install_Limited_Withed_Unit): Do nothing in case of limited with_clause
|
||||
@ -165,7 +170,7 @@
|
||||
|
||||
2003-10-30 Vasiliy Fofanov <fofanov@act-europe.fr>
|
||||
|
||||
* 3vtrasym.adb:
|
||||
* 3vtrasym.adb:
|
||||
Demangle Ada symbols returned by TBK$SYMBOLIZE. Correctly align line
|
||||
numbers when symbol name is too long.
|
||||
|
||||
@ -183,8 +188,8 @@
|
||||
|
||||
* lib-writ.adb (Write_ALI): Never write ali file if -gnats is specified
|
||||
|
||||
* par.adb, par-ch12.adb, par-ch13.adb, par-ch2.adb, par-ch3.adb,
|
||||
par-ch5.adb, par-ch6.adb, par-ch9.adb, par-util.adb:
|
||||
* par.adb, par-ch12.adb, par-ch13.adb, par-ch2.adb, par-ch3.adb,
|
||||
par-ch5.adb, par-ch6.adb, par-ch9.adb, par-util.adb:
|
||||
New handling of Id_Check parameter to improve recognition of keywords
|
||||
used as identifiers.
|
||||
Update copyright notice to include 2003
|
||||
@ -199,18 +204,18 @@
|
||||
|
||||
2003-10-29 Vasiliy Fofanov <fofanov@act-europe.fr>
|
||||
|
||||
* 3vtrasym.adb, 5vtraent.adb, 5vtraent.ads, tb-alvms.c:
|
||||
* 3vtrasym.adb, 5vtraent.adb, 5vtraent.ads, tb-alvms.c:
|
||||
Support for TBK$SYMBOLIZE-based symbolic traceback.
|
||||
|
||||
2003-10-29 Jose Ruiz <ruiz@act-europe.fr>
|
||||
|
||||
* exp_disp.adb:
|
||||
* exp_disp.adb:
|
||||
Revert previous change, that did not work well when pragma No_Run_Time
|
||||
was used in conjunction with a run-time other than ZFP.
|
||||
|
||||
2003-10-29 Vincent Celier <celier@gnat.com>
|
||||
|
||||
* make.adb:
|
||||
* make.adb:
|
||||
(Gnatmake): When there are no Ada mains in attribute Main, disable the
|
||||
bind and link steps only is switch -z is not used.
|
||||
|
||||
@ -238,11 +243,11 @@
|
||||
|
||||
2003-10-29 Javier Miranda <miranda@gnat.com>
|
||||
|
||||
* sem_ch12.adb:
|
||||
* sem_ch12.adb:
|
||||
(Analyze_Package_Instantiation): Check that instances can not be used in
|
||||
limited with_clauses.
|
||||
|
||||
* sem_ch8.adb:
|
||||
* sem_ch8.adb:
|
||||
(Analyze_Package_Renaming): Check that limited withed packages cannot
|
||||
be renamed. Improve text on error messages related to limited
|
||||
with_clauses.
|
||||
@ -332,18 +337,18 @@
|
||||
|
||||
2003-10-27 Robert Dewar <dewar@gnat.com>
|
||||
|
||||
* exp_ch3.adb:
|
||||
* exp_ch3.adb:
|
||||
(Freeze_Array_Type): We do not need an initialization routine for types
|
||||
derived from String or Wide_String. They should be treated the same
|
||||
as String and Wide_String themselves. This caused problems with the
|
||||
use of Initialize_Scalars.
|
||||
|
||||
* exp_ch5.adb:
|
||||
* exp_ch5.adb:
|
||||
(Expand_Assign_Record): Do component-wise assignment of non-byte aligned
|
||||
composites. This allows use of component clauses that are not byte
|
||||
aligned.
|
||||
|
||||
* sem_prag.adb:
|
||||
* sem_prag.adb:
|
||||
(Analyze_Pragma, case Pack): Generate warning and ignore pack if there
|
||||
is an attempt to pack an array of atomic objects.
|
||||
|
||||
@ -351,12 +356,12 @@
|
||||
|
||||
2003-10-27 Pascal Obry <obry@gnat.com>
|
||||
|
||||
* g-dirope.adb:
|
||||
* g-dirope.adb:
|
||||
(Basename): Check for drive letters in a pathname only on DOS based OS.
|
||||
|
||||
2003-10-27 Vincent Celier <celier@gnat.com>
|
||||
|
||||
* make.adb:
|
||||
* make.adb:
|
||||
(Gnatmake): When unable to change dir to the object dir, display the
|
||||
content of the parent dir of the obj dir, to try to understand why this
|
||||
happens.
|
||||
@ -367,16 +372,16 @@
|
||||
|
||||
2003-10-27 Ed Schonberg <schonberg@gnat.com>
|
||||
|
||||
* sem_ch12.adb:
|
||||
* sem_ch12.adb:
|
||||
(Inline_Instance_Body): Indicate that the save/restore of use_clauses
|
||||
should not be done in Save/Restore_Scope_Stack, because it is performed
|
||||
locally.
|
||||
|
||||
* sem_ch8.adb:
|
||||
* sem_ch8.adb:
|
||||
(Save_Scope_Stack, Restore_Scope_Stack): Add parameter to indicate
|
||||
whether use clauses should be removed/restored.
|
||||
|
||||
* sem_ch8.ads:
|
||||
* sem_ch8.ads:
|
||||
(Save_Scope_Stack, Restore_Scope_Stack): Add parameter to indicate
|
||||
whether use clauses should be removed/restored.
|
||||
|
||||
|
@ -973,8 +973,8 @@ fp_prec_to_size (int prec)
|
||||
|
||||
for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); mode != VOIDmode;
|
||||
mode = GET_MODE_WIDER_MODE (mode))
|
||||
if (GET_MODE_BITSIZE (mode) == prec)
|
||||
return GET_MODE_SIZE (mode) * BITS_PER_UNIT;
|
||||
if (GET_MODE_PRECISION (mode) == prec)
|
||||
return GET_MODE_BITSIZE (mode);
|
||||
|
||||
abort ();
|
||||
}
|
||||
@ -986,8 +986,8 @@ fp_size_to_prec (int size)
|
||||
|
||||
for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); mode != VOIDmode;
|
||||
mode = GET_MODE_WIDER_MODE (mode))
|
||||
if (GET_MODE_SIZE (mode) * BITS_PER_UNIT == size)
|
||||
return GET_MODE_BITSIZE (mode);
|
||||
if (GET_MODE_BITSIZE (mode) == size)
|
||||
return GET_MODE_PRECISION (mode);
|
||||
|
||||
abort ();
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ struct mode_data
|
||||
|
||||
const char *name; /* printable mode name -- SI, not SImode */
|
||||
enum mode_class class; /* this mode class */
|
||||
unsigned int bitsize; /* size in bits, equiv to TYPE_PRECISION */
|
||||
unsigned int precision; /* size in bits, equiv to TYPE_PRECISION */
|
||||
unsigned int bytesize; /* storage size in addressable units */
|
||||
unsigned int ncomponents; /* number of subunits */
|
||||
unsigned int alignment; /* mode alignment */
|
||||
@ -262,13 +262,13 @@ enum requirement { SET, UNSET, OPTIONAL };
|
||||
|
||||
static void
|
||||
validate_mode (struct mode_data *m,
|
||||
enum requirement r_bitsize,
|
||||
enum requirement r_precision,
|
||||
enum requirement r_bytesize,
|
||||
enum requirement r_component,
|
||||
enum requirement r_ncomponents,
|
||||
enum requirement r_format)
|
||||
{
|
||||
validate_field (m, bitsize);
|
||||
validate_field (m, precision);
|
||||
validate_field (m, bytesize);
|
||||
validate_field (m, component);
|
||||
validate_field (m, ncomponents);
|
||||
@ -304,7 +304,7 @@ complete_mode (struct mode_data *m)
|
||||
|
||||
validate_mode (m, UNSET, UNSET, UNSET, UNSET, UNSET);
|
||||
|
||||
m->bitsize = 0;
|
||||
m->precision = 0;
|
||||
m->bytesize = 0;
|
||||
m->ncomponents = 0;
|
||||
m->component = 0;
|
||||
@ -349,8 +349,8 @@ complete_mode (struct mode_data *m)
|
||||
/* Complex modes should have a component indicated, but no more. */
|
||||
validate_mode (m, UNSET, UNSET, SET, UNSET, UNSET);
|
||||
m->ncomponents = 2;
|
||||
if (m->component->bitsize != (unsigned int)-1)
|
||||
m->bitsize = 2 * m->component->bitsize;
|
||||
if (m->component->precision != (unsigned int)-1)
|
||||
m->precision = 2 * m->component->precision;
|
||||
m->bytesize = 2 * m->component->bytesize;
|
||||
break;
|
||||
|
||||
@ -358,8 +358,8 @@ complete_mode (struct mode_data *m)
|
||||
case MODE_VECTOR_FLOAT:
|
||||
/* Vector modes should have a component and a number of components. */
|
||||
validate_mode (m, UNSET, UNSET, SET, SET, UNSET);
|
||||
if (m->component->bitsize != (unsigned int)-1)
|
||||
m->bitsize = m->ncomponents * m->component->bitsize;
|
||||
if (m->component->precision != (unsigned int)-1)
|
||||
m->precision = m->ncomponents * m->component->precision;
|
||||
m->bytesize = m->ncomponents * m->component->bytesize;
|
||||
break;
|
||||
|
||||
@ -413,7 +413,7 @@ make_complex_modes (enum mode_class class,
|
||||
for (m = modes[class]; m; m = m->next)
|
||||
{
|
||||
/* Skip BImode. FIXME: BImode probably shouldn't be MODE_INT. */
|
||||
if (m->bitsize == 1)
|
||||
if (m->precision == 1)
|
||||
continue;
|
||||
|
||||
if (strlen (m->name) >= sizeof buf)
|
||||
@ -479,7 +479,7 @@ make_vector_modes (enum mode_class class, unsigned int width,
|
||||
not be necessary. */
|
||||
if (class == MODE_FLOAT && m->bytesize == 1)
|
||||
continue;
|
||||
if (class == MODE_INT && m->bitsize == 1)
|
||||
if (class == MODE_INT && m->precision == 1)
|
||||
continue;
|
||||
|
||||
if ((size_t)snprintf (buf, sizeof buf, "V%u%s", ncomponents, m->name)
|
||||
@ -515,12 +515,12 @@ make_special_mode (enum mode_class class, const char *name,
|
||||
|
||||
static void
|
||||
make_int_mode (const char *name,
|
||||
unsigned int bitsize, unsigned int bytesize,
|
||||
unsigned int precision, unsigned int bytesize,
|
||||
const char *file, unsigned int line)
|
||||
{
|
||||
struct mode_data *m = new_mode (MODE_INT, name, file, line);
|
||||
m->bytesize = bytesize;
|
||||
m->bitsize = bitsize;
|
||||
m->precision = precision;
|
||||
}
|
||||
|
||||
#define FLOAT_MODE(N, Y, F) FRACTIONAL_FLOAT_MODE (N, -1, Y, F)
|
||||
@ -529,13 +529,13 @@ make_int_mode (const char *name,
|
||||
|
||||
static void
|
||||
make_float_mode (const char *name,
|
||||
unsigned int bitsize, unsigned int bytesize,
|
||||
unsigned int precision, unsigned int bytesize,
|
||||
const char *format,
|
||||
const char *file, unsigned int line)
|
||||
{
|
||||
struct mode_data *m = new_mode (MODE_FLOAT, name, file, line);
|
||||
m->bytesize = bytesize;
|
||||
m->bitsize = bitsize;
|
||||
m->precision = precision;
|
||||
m->format = format;
|
||||
}
|
||||
|
||||
@ -565,7 +565,7 @@ reset_float_format (const char *name, const char *format,
|
||||
make_partial_integer_mode (#M, "P" #M, -1, __FILE__, __LINE__)
|
||||
static void ATTRIBUTE_UNUSED
|
||||
make_partial_integer_mode (const char *base, const char *name,
|
||||
unsigned int bitsize,
|
||||
unsigned int precision,
|
||||
const char *file, unsigned int line)
|
||||
{
|
||||
struct mode_data *m;
|
||||
@ -582,7 +582,7 @@ make_partial_integer_mode (const char *base, const char *name,
|
||||
}
|
||||
|
||||
m = new_mode (MODE_PARTIAL_INT, name, file, line);
|
||||
m->bitsize = bitsize;
|
||||
m->precision = precision;
|
||||
m->component = component;
|
||||
}
|
||||
|
||||
@ -645,18 +645,18 @@ create_modes (void)
|
||||
/* Processing. */
|
||||
|
||||
/* Sort a list of modes into the order needed for the WIDER field:
|
||||
major sort by bitsize, minor sort by component bitsize.
|
||||
major sort by precision, minor sort by component precision.
|
||||
|
||||
For instance:
|
||||
QI < HI < SI < DI < TI
|
||||
V4QI < V2HI < V8QI < V4HI < V2SI.
|
||||
|
||||
If the bitsize is not set, sort by the bytesize. A mode with
|
||||
bitsize set gets sorted before a mode without bitsize set, if
|
||||
If the precision is not set, sort by the bytesize. A mode with
|
||||
precision set gets sorted before a mode without precision set, if
|
||||
they have the same bytesize; this is the right thing because
|
||||
the bitsize must always be smaller than the bytesize * BITS_PER_UNIT.
|
||||
the precision must always be smaller than the bytesize * BITS_PER_UNIT.
|
||||
We don't have to do anything special to get this done -- an unset
|
||||
bitsize shows up as (unsigned int)-1, i.e. UINT_MAX. */
|
||||
precision shows up as (unsigned int)-1, i.e. UINT_MAX. */
|
||||
static int
|
||||
cmp_modes (const void *a, const void *b)
|
||||
{
|
||||
@ -668,9 +668,9 @@ cmp_modes (const void *a, const void *b)
|
||||
else if (m->bytesize < n->bytesize)
|
||||
return -1;
|
||||
|
||||
if (m->bitsize > n->bitsize)
|
||||
if (m->precision > n->precision)
|
||||
return 1;
|
||||
else if (m->bitsize < n->bitsize)
|
||||
else if (m->precision < n->precision)
|
||||
return -1;
|
||||
|
||||
if (!m->component && !n->component)
|
||||
@ -681,9 +681,9 @@ cmp_modes (const void *a, const void *b)
|
||||
else if (m->component->bytesize < n->component->bytesize)
|
||||
return -1;
|
||||
|
||||
if (m->component->bitsize > n->component->bitsize)
|
||||
if (m->component->precision > n->component->precision)
|
||||
return 1;
|
||||
else if (m->component->bitsize < n->component->bitsize)
|
||||
else if (m->component->precision < n->component->precision)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
@ -802,7 +802,7 @@ enum machine_mode\n{");
|
||||
end will try to use it for bitfields in structures and the
|
||||
like, which we do not want. Only the target md file should
|
||||
generate BImode widgets. */
|
||||
if (first && first->bitsize == 1)
|
||||
if (first && first->precision == 1)
|
||||
first = first->next;
|
||||
|
||||
if (first && last)
|
||||
@ -892,16 +892,16 @@ emit_mode_class (void)
|
||||
}
|
||||
|
||||
static void
|
||||
emit_mode_bitsize (void)
|
||||
emit_mode_precision (void)
|
||||
{
|
||||
enum mode_class c;
|
||||
struct mode_data *m;
|
||||
|
||||
print_decl ("unsigned short", "mode_bitsize", "NUM_MACHINE_MODES");
|
||||
print_decl ("unsigned short", "mode_precision", "NUM_MACHINE_MODES");
|
||||
|
||||
for_all_modes (c, m)
|
||||
if (m->bitsize != (unsigned int)-1)
|
||||
tagged_printf ("%u", m->bitsize, m->name);
|
||||
if (m->precision != (unsigned int)-1)
|
||||
tagged_printf ("%u", m->precision, m->name);
|
||||
else
|
||||
tagged_printf ("%u*BITS_PER_UNIT", m->bytesize, m->name);
|
||||
|
||||
@ -968,8 +968,8 @@ emit_mode_mask (void)
|
||||
: ((unsigned HOST_WIDE_INT) 1 << (m)) - 1\n");
|
||||
|
||||
for_all_modes (c, m)
|
||||
if (m->bitsize != (unsigned int)-1)
|
||||
tagged_printf ("MODE_MASK (%u)", m->bitsize, m->name);
|
||||
if (m->precision != (unsigned int)-1)
|
||||
tagged_printf ("MODE_MASK (%u)", m->precision, m->name);
|
||||
else
|
||||
tagged_printf ("MODE_MASK (%u*BITS_PER_UNIT)", m->bytesize, m->name);
|
||||
|
||||
@ -1020,7 +1020,7 @@ emit_class_narrowest_mode (void)
|
||||
/* Bleah, all this to get the comment right for MIN_MODE_INT. */
|
||||
tagged_printf ("MIN_%s", mode_class_names[c],
|
||||
modes[c]
|
||||
? (modes[c]->bitsize != 1
|
||||
? (modes[c]->precision != 1
|
||||
? modes[c]->name
|
||||
: (modes[c]->next
|
||||
? modes[c]->next->name
|
||||
@ -1156,7 +1156,7 @@ emit_insn_modes_c (void)
|
||||
emit_insn_modes_c_header ();
|
||||
emit_mode_name ();
|
||||
emit_mode_class ();
|
||||
emit_mode_bitsize ();
|
||||
emit_mode_precision ();
|
||||
emit_mode_size ();
|
||||
emit_mode_nunits ();
|
||||
emit_mode_wider ();
|
||||
|
@ -47,7 +47,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
A MODE argument must be the printable name of a machine mode,
|
||||
without quotation marks or trailing "mode". For instance, SI.
|
||||
|
||||
A BITSIZE, BYTESIZE, or COUNT argument must be a positive integer
|
||||
A PRECISION, BYTESIZE, or COUNT argument must be a positive integer
|
||||
constant.
|
||||
|
||||
A FORMAT argument must be one of the real_mode_format structures
|
||||
@ -78,18 +78,18 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
declares MODE to be of class INT and BYTESIZE bytes wide.
|
||||
All of the bits of its representation are significant.
|
||||
|
||||
FRACTIONAL_INT_MODE (MODE, BITSIZE, BYTESIZE);
|
||||
FRACTIONAL_INT_MODE (MODE, PRECISION, BYTESIZE);
|
||||
declares MODE to be of class INT, BYTESIZE bytes wide in
|
||||
storage, but with only BITSIZE significant bits.
|
||||
storage, but with only PRECISION significant bits.
|
||||
|
||||
FLOAT_MODE (MODE, BYTESIZE, FORMAT);
|
||||
declares MODE to be of class FLOAT and BYTESIZE bytes wide,
|
||||
using floating point format FORMAT.
|
||||
All of the bits of its representation are significant.
|
||||
|
||||
FRACTIONAL_FLOAT_MODE (MODE, BITSIZE, BYTESIZE, FORMAT);
|
||||
FRACTIONAL_FLOAT_MODE (MODE, PRECISION, BYTESIZE, FORMAT);
|
||||
declares MODE to be of class FLOAT, BYTESIZE bytes wide in
|
||||
storage, but with only BITSIZE significant bits, using
|
||||
storage, but with only PRECISION significant bits, using
|
||||
floating point format FORMAT.
|
||||
|
||||
RESET_FLOAT_FORMAT (MODE, FORMAT);
|
||||
@ -101,7 +101,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
declares a mode of class PARTIAL_INT with the same size as
|
||||
MODE (which must be an INT mode). The name of the new mode
|
||||
is made by prefixing a P to the name MODE. This statement
|
||||
may grow a BITSIZE argument in the future.
|
||||
may grow a PRECISION argument in the future.
|
||||
|
||||
VECTOR_MODE (CLASS, MODE, COUNT);
|
||||
Declare a vector mode whose component mode is MODE (of class
|
||||
|
@ -76,15 +76,15 @@ extern const unsigned char mode_class[NUM_MACHINE_MODES];
|
||||
#define SCALAR_FLOAT_MODE_P(MODE) \
|
||||
(GET_MODE_CLASS (MODE) == MODE_FLOAT)
|
||||
|
||||
/* Get the size in bytes of an object of mode MODE. */
|
||||
/* Get the size in bytes and bits of an object of mode MODE. */
|
||||
|
||||
extern CONST_MODE_SIZE unsigned char mode_size[NUM_MACHINE_MODES];
|
||||
#define GET_MODE_SIZE(MODE) mode_size[MODE]
|
||||
#define GET_MODE_SIZE(MODE) ((unsigned short) mode_size[MODE])
|
||||
#define GET_MODE_BITSIZE(MODE) ((unsigned short) (GET_MODE_SIZE (MODE) * BITS_PER_UNIT))
|
||||
|
||||
/* Get the size in bits of an object of mode MODE. */
|
||||
|
||||
extern const unsigned short mode_bitsize[NUM_MACHINE_MODES];
|
||||
#define GET_MODE_BITSIZE(MODE) mode_bitsize[MODE]
|
||||
/* Get the number of value bits of an object of mode MODE. */
|
||||
extern const unsigned short mode_precision[NUM_MACHINE_MODES];
|
||||
#define GET_MODE_PRECISION(MODE) mode_precision[MODE]
|
||||
|
||||
/* Get a bitmask containing 1 for all bits in a word
|
||||
that fit within mode MODE. */
|
||||
|
@ -203,10 +203,10 @@ variable_size (tree size)
|
||||
#define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
|
||||
#endif
|
||||
|
||||
/* Return the machine mode to use for a nonscalar of SIZE bits.
|
||||
The mode must be in class CLASS, and have exactly that many bits.
|
||||
If LIMIT is nonzero, modes of wider than MAX_FIXED_MODE_SIZE will not
|
||||
be used. */
|
||||
/* Return the machine mode to use for a nonscalar of SIZE bits. The
|
||||
mode must be in class CLASS, and have exactly that many value bits;
|
||||
it may have padding as well. If LIMIT is nonzero, modes of wider
|
||||
than MAX_FIXED_MODE_SIZE will not be used. */
|
||||
|
||||
enum machine_mode
|
||||
mode_for_size (unsigned int size, enum mode_class class, int limit)
|
||||
@ -219,7 +219,7 @@ mode_for_size (unsigned int size, enum mode_class class, int limit)
|
||||
/* Get the first mode which has this size, in the specified class. */
|
||||
for (mode = GET_CLASS_NARROWEST_MODE (class); mode != VOIDmode;
|
||||
mode = GET_MODE_WIDER_MODE (mode))
|
||||
if (GET_MODE_BITSIZE (mode) == size)
|
||||
if (GET_MODE_PRECISION (mode) == size)
|
||||
return mode;
|
||||
|
||||
return BLKmode;
|
||||
@ -242,7 +242,7 @@ mode_for_size_tree (tree size, enum mode_class class, int limit)
|
||||
}
|
||||
|
||||
/* Similar, but never return BLKmode; return the narrowest mode that
|
||||
contains at least the requested number of bits. */
|
||||
contains at least the requested number of value bits. */
|
||||
|
||||
enum machine_mode
|
||||
smallest_mode_for_size (unsigned int size, enum mode_class class)
|
||||
@ -253,7 +253,7 @@ smallest_mode_for_size (unsigned int size, enum mode_class class)
|
||||
specified class. */
|
||||
for (mode = GET_CLASS_NARROWEST_MODE (class); mode != VOIDmode;
|
||||
mode = GET_MODE_WIDER_MODE (mode))
|
||||
if (GET_MODE_BITSIZE (mode) >= size)
|
||||
if (GET_MODE_PRECISION (mode) >= size)
|
||||
return mode;
|
||||
|
||||
abort ();
|
||||
|
Loading…
Reference in New Issue
Block a user