This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] PowerPC ieee float tests



On Saturday, February 2, 2002, at 02:41 PM, Tom Rix wrote:

> Dale Johannesen wrote:
>
>> On Saturday, February 2, 2002, at 12:11 PM, Tom Rix wrote:
>>
>>> PowerPC uses 64 bit floating point registers which causes the ieee float
>>> tests to fail.  This patch appends -ffloat-store to the test flags.   It
>>> also cleans up other targets doing the same thing.
>>
>> I don't think this is right.  These tests have been passing on Darwin
>> (ppc32)
>> "forever", and it doesn't look like anybody has hacked the ieee.exp
>> file locally to make this happen.
>
> This is  a regression wrt  GnuPro branch that I work on.   In the dim past
> -ffloat-store was always appended to every target.  From ChangeLog this 
> was
> 8/13/1998,  it was limited to only x86  7/22/2001.   You should check if 
> your
> ieee.exp is up to date.

It is.

> The test I looked at specifically is 980619-1.  Fairly simple, count how 
> may
> divides by two does it take to get a 1.0 to go to 0.   I have included a 
> dump
> of the assembly.  Since this calculation is being done in   64 bit 
> registers,
> it takes 53 iterations instead of the expected 24.
>
>> Perhaps you mean Power, which didn'thave the single-precision 
>> instructions?
> This is powerpc-ibm-aix4.3.3.0.
> 	fmul 13,13,11		f13 = f13 * 0.5
> 	addi 9,9,1
> 	fadd 0,13,12		f0 = 1.0 + f13
> 	fcmpu 0,0,12
> 	bne+ 0,L..6		continue until f0 == 1.0
> 	cmpwi 0,9,24

The code I get uses fmuls and fadds (single-precision) instructions, and 
works
correctly.  I see:  AIX defaults to TARGET_POWER, so it won't use the 
powerPC-specific instructions.  Darwin and sysv4 default to TARGET_POWERPC.
   Can you change it to
be dependent on AIX instead of PowerPC?  That would be more accurate.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]