This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
GCC 4.3.4 is casting my QImode vars to SImode for libcall
- From: "Paulo J. Matos" <pocmatos at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 14 Jun 2010 18:29:03 +0100
- Subject: GCC 4.3.4 is casting my QImode vars to SImode for libcall
Hello,
In gcc4.3.4, for my architecture: 16 BITS_PER_UNIT, 1 UNIT_PER_WORD,
with INT_TYPE_SIZE = 16 and FLOAT_TYPE_SIZE = 32, then an unsigned int
is QImode and a float is HFmode.
However with:
float uitof(unsigned int x) { return x; }
I get a call to the function __floatunsihf. Shouldn't this be __floatunqihf?
Even if I provide a floatunqihf with set_conv_libfunc this is not
used. The problem with using __floatunsihf is that it is turning a
QImod into an SImode (64bits in my case) and then convert to an HFmode
(32bits). While QImode->HFmode is an extension 16bit->32bit, SImode ->
HFmode is a truncation 64bit->32bit and not ideal at all.
Any reason behind this or can I instruct GCC not to convert the
unsigned int from QImode to SImode?
Cheers,
--
PMatos