Re: Software FP Support

2010-03-30 Thread Paulo J. Matos
On Tue, Mar 30, 2010 at 3:29 PM, Joseph S. Myers wrote: > On Tue, 30 Mar 2010, Paulo J. Matos wrote: > >> I have 16 BITS_PER_UNIT for this target, with 1 UNITS_PER_WORD. If I >> define FLOAT_TYPE_SIZE to be 32, then a float is an HFmode and it's >> not that gcc uses this. >> Defining BITS_PER_UNIT

Re: Software FP Support

2010-03-30 Thread Joseph S. Myers
On Tue, 30 Mar 2010, Paulo J. Matos wrote: > I have 16 BITS_PER_UNIT for this target, with 1 UNITS_PER_WORD. If I > define FLOAT_TYPE_SIZE to be 32, then a float is an HFmode and it's > not that gcc uses this. > Defining BITS_PER_UNIT to 16 shouldn't generate problems inside the > compiler given t

Re: Software FP Support

2010-03-30 Thread Paulo J. Matos
On Tue, Mar 30, 2010 at 2:54 PM, Paulo J. Matos wrote: > > On a surprising note, I decided to try and compile it with > FLOAT_TYPE_SIZE with 64 bits, therefore a float should not be SFmode > and the floatunsihf shouldn't be generated anymore. I was wrong, it is > still generated. > This is false,

Re: Software FP Support

2010-03-30 Thread Paulo J. Matos
On Tue, Mar 30, 2010 at 2:29 PM, Joseph S. Myers wrote: > No, HFmode only exists if you specifically define it to exist for a > target.  Unless you really know what you are doing, you should not define > it until you have ordinary float (SFmode) working.  If HFmode calls are > generated without ha

Re: Software FP Support

2010-03-30 Thread Paulo J. Matos
On Tue, Mar 30, 2010 at 2:29 PM, Joseph S. Myers wrote: > On Tue, 30 Mar 2010, Paulo J. Matos wrote: > >> GCC is generating a call to floatunsihf when it needs to convert an >> unsigned integer to a float. And this call is being generated because >> I am compiling to a 16bit target, where floats a

Re: Software FP Support

2010-03-30 Thread Joseph S. Myers
On Tue, 30 Mar 2010, Paulo J. Matos wrote: > GCC is generating a call to floatunsihf when it needs to convert an > unsigned integer to a float. And this call is being generated because > I am compiling to a 16bit target, where floats are 32, meaning floats > are HFmode. No, HFmode only exists if

Software FP Support

2010-03-30 Thread Paulo J. Matos
Hi, I am trying to get FP support working in a backend. This raised several questions which were promptly answered and after digging deeper I found the culprit. GCC is generating a call to floatunsihf when it needs to convert an unsigned integer to a float. And this call is being generated because