GCC 4.3.4 is casting my QImode vars to SImode for libcall
Paulo J. Matos
pocmatos@gmail.com
Tue Jun 15 09:26:00 GMT 2010
On Tue, Jun 15, 2010 at 9:17 AM, Paulo J. Matos <pocmatos@gmail.com> wrote:
> On Mon, Jun 14, 2010 at 8:56 PM, Joseph S. Myers
> <joseph@codesourcery.com> wrote:
>>
>> Every hardcoded reference to a mode other than QImode in the
>> target-independent compiler is suspicious and needs investigating if you
>> are doing such a port. In this case, the SImode references in
>> expand_float are likely the problem.
>>
>
> Thanks for the tip Joseph, I will look into it.
>
> --
> PMatos
>
Just noticed the following also in optabs.c:
/* We can't do it with an insn, so use a library call. But first ensure
that the mode of TO is at least as wide as SImode, since those are the
only library calls we know about. */
if (GET_MODE_SIZE (GET_MODE (to)) < GET_MODE_SIZE (SImode))
{
target = gen_reg_rtx (SImode);
expand_fix (target, from, unsignedp);
}
This comment provides some insight on to why gcc keeps converting to
SImode. However, I think (and it is at least applicable to my case)
that it should convert to QImode and if there are no libraries, tell
the implementor of the backend to provide those functions. I can
imagine that in some archs, like mine SImode is just too big and the
convertion turns out to be a pretty bad option.
--
PMatos
More information about the Gcc
mailing list