* magic 8 constant (bits / byte maybe?) in GCC JIT memento_of_new_rvalue_from_const <long>::get_wide_int
@ 2015-01-01 0:00 Basile Starynkevitch
0 siblings, 0 replies; only message in thread
From: Basile Starynkevitch @ 2015-01-01 0:00 UTC (permalink / raw)
To: jit, gcc
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 <>
bool
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?
Regards.
--
Basile Starynkevitch http://starynkevitch.net/Basile/
France
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-20 9:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-01 0:00 magic 8 constant (bits / byte maybe?) in GCC JIT memento_of_new_rvalue_from_const <long>::get_wide_int Basile Starynkevitch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).