This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: floating point problem
- To: <ecos-discuss at sourceware dot cygnus dot com>
- Subject: Re: [ECOS] floating point problem
- From: "Rini van Zetten" <Rini at Arvoo dot nl>
- Date: Thu, 1 Nov 2001 16:43:35 +0100
It seems to have something to do wit the place the float is stored.
If I debug this sample :
int main(void)
{
char s[100];
float f;//=0.0123;
strcpy (s,"Rini van Zetten");
f=0.2;
printf("Hello, eCos world!, f= %f\n",f);
return 0;
}
I can see the value of s after the strcpy i my name.
after the f=0.2; line the value (first 4 bytes) of s have changed
("`\031\021\000")
Maybe this is a compiler problem ?
Rini
-----Original Message-----
From: Rini van Zetten <Rini@Arvoo.nl>
To: ecos-discuss@sourceware.cygnus.com <ecos-discuss@sourceware.cygnus.com>
Date: donderdag 1 november 2001 15:56
Subject: Re: [ECOS] floating point problem
>I have a recent pentiumIII system with fpu.
>
>When configuring ecos do I have to enable floating point support ?
>
>Rini
>
>-----Original Message-----
>From: Jonathan Larmour <jlarmour@redhat.com>
>To: Rini van Zetten <Rini@Arvoo.nl>
>Cc: ecos-discuss@sourceware.cygnus.com
<ecos-discuss@sourceware.cygnus.com>;
>Mark Salter <msalter@redhat.com>
>Date: donderdag 1 november 2001 15:49
>Subject: Re: [ECOS] floating point problem
>
>
>>Rini van Zetten wrote:
>>>
>>> Hello all,
>>>
>>> I'm a newbie to ecos and just do some simple test.
>>>
>>> I have create a redboot boot floppy for my i386 target, this works fine.
>>>
>>> I'm able to compile and run the examples (eg hello.c).
>>>
>>> But if i want to do some tests with a float in it. the sample crashes :
>>> It even crashes if i only declare a var as float.
>>>
>>> It crashes in clits.hxx (line109) :Segmentation fault
>>
>>Just checking the obvious, but do you definitely have an FPU? FPUs weren't
>>"standard" until the Pentium (and even some later Pentiums for the
embedded
>>market don't have an FPU either).
>>
>>If you do, then it may well be something to do with recent changes that
>>extensively altered the x86 FPU support, although the extra new features
>>are disabled by default, but perhaps something slipped through?
>>
>>Jifl
>>--
>>Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
>>Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
>>
>