This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unreviewed patch to tree-ssa-loop-ivopts.c


Paul Schlie <schlie@comcast.net> writes:
>> From: Richard Sandiford <rsandifo@redhat.com>
>>> Paul Schlie <schlie@comcast.net> writes:
>>> Sorry if I've missed it, where is where does BITS_PER_UNIT define the root
>>> size of all target modes? (i.e. where is a UNIT hard equated with QImode?)
>>> 
>>> I've searched all the sources, and can't find any relationship established
>>> between BITS_PER_UNIT any mode definitions anywhere,
>> 
>> See genmodes.c:emit_mode_precision.  The definitions of the modes
>> themselves are in machmode.def:
>> 
>>     INT_MODE (QI, 1);
>>     INT_MODE (HI, 2);
>>     INT_MODE (SI, 4);
>> 
>> where the second argument is the number of bytes (i.e. number of units).
>
> Unfortunaly all I see is a definition of their relative sizes,

Are we looking at the same sources?

static void
emit_mode_precision (void)
{
  int c;
  struct mode_data *m;

  print_decl ("unsigned short", "mode_precision", "NUM_MACHINE_MODES");

  for_all_modes (c, m)
    if (m->precision != (unsigned int)-1)
      tagged_printf ("%u", m->precision, m->name);
    else
      tagged_printf ("%u*BITS_PER_UNIT", m->bytesize, m->name);
---------------------^^^^^^^^^^^^^^^^^

  print_closer ();
}

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]