This is the mail archive of the 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]

magic 8 constant (bits / byte maybe?) in GCC JIT memento_of_new_rvalue_from_const <long>::get_wide_int

Hello All,

In GCC trunk svn 225726 the file gcc/jit/jit-recording.c contains the
following code near line 4168:

/* The get_wide_int specialization for <long>.  */

template <>
memento_of_new_rvalue_from_const <long>::get_wide_int (wide_int *out) const
  *out = wi::shwi (m_value, sizeof (m_value) * 8);
  return true;

I am guessing that the magic constant 8 above (i.e. line 4170) is the
bits per char on the host machine, but I am not entirely sure of that.
(Maybe it is the bits per char on the target, but I guess not)

Is my understanding correct?

Do we care about running GCCJIT on weird host machines where char is
not a 8 bit byte?

Do we care abour running GCCJIT for cross-compilation to weird target
machines where char is not a 8 bits byte?

Out of curiosity, what are today the systems for which GCC is hosted,
or is targetted, on something where char are not an 8 bits byte?


Basile Starynkevitch

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