Subject: Re: Softfloat for MIPS
To: NetBSD Toolchain <tech-toolchain@NetBSD.org>
From: Markus Mayer <mmayer@redback.com>
List: tech-toolchain
Date: 06/09/2006 15:00:51
Valeriy E. Ushakov wrote:
> On Fri, Jun 09, 2006 at 12:12:03 -0700, Markus Mayer wrote:
> 
> 
>>>-#ifndef hp300
>>>+#ifndef notdef
>>>		s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;
>>>#else /* avoid floating point */
>>>		int quot = o / p->kcountsize;
>>
>>Nope, that's not it. I just looked and it's
>>    #ifndef notdef
>>            s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;
>>    #else /* avoid floating point */
>>already.
> 
> 
> Right, and since notdef is not defined the #ifNdef notdef is taken and
> you hit the fp code, not the #else /* avoid floating point */ branch.
> Change that to #ifdef.

Sorry, didn't help either.

I did, however, come across lib/libc/softfloat.

I added
   .include "${.CURDIR}/softfloat/Makefile.inc"
to lib/libc/Makefile.

Then I created lib/libc/arch/mips/softfloat based on 
lib/libc/arch/powerpc. I didn't change much in the headers 
(representation of floating point numbers, etc.), which could be a bad 
idea, but I just wanted to try and see what happens.

Now it looks like we might be getting somewhere. At least libc linked 
this time. Now I'm hoping that the MIPS won't choke too badly on the 
PowerPC softfloat headers.

Regards,
Markus

-- 
Markus Mayer
Redback Networks Inc.