This is the mail archive of the
mailing list for the GCC project.
magic 8 constant (bits / byte maybe?) in GCC JIT memento_of_new_rvalue_from_const <long>::get_wide_int
- From: Basile Starynkevitch <basile at starynkevitch dot net>
- To: jit at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Mon, 20 Jul 2015 11:20:43 +0200
- Subject: magic 8 constant (bits / byte maybe?) in GCC JIT memento_of_new_rvalue_from_const <long>::get_wide_int
- Authentication-results: sourceware.org; auth=none
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>. */
memento_of_new_rvalue_from_const <long>::get_wide_int (wide_int *out) const
*out = wi::shwi (m_value, sizeof (m_value) * 8);
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 http://starynkevitch.net/Basile/