>
>
> On Wed, 6 Apr 2005, Eddie Dawydiuk wrote:
>
>> > Given there is an FP emulator in the kernel, I sort of guessing that
>> > because the EP9301 has FP H/W (albeit broken) the kernel never gets
>> the
>> > illegal instruction trap to get to the FP emulation code?
>> >
>> > Is there anyway to tell the EP9301 to disable the FP H/W and generate
>> > traps? I searched the chips user manual but didn't find anything.
>> >
>> > Is there any way to fix this generally?
>>
>> I have been told by other developers the problem has been fixed by
>> upgrading to a newer version of crosstools. In my limited amount of
>> testing I did see a problem with the function atof() that seems to be
>> related to the math libraries on the onboard flash. Other than that I
>> have
>> been unable to find any problems related to floating point... Could you
>> provide more details as to what failures you are seeing, is it related
>> to
>> all floating point operations or specific function calls...? What
>> version
>> of crosstools and gcc are you using?
>>
>
> It's an EP9301 from a TS7200 board bought in Sept last year.
>
> cross tools arm-linux/gcc-3.3.2-glibc-2.3.2
Hmmm, it looks like the version on the CD is gcc-3.3.4-glibc-2.3.2 it you
must have compiled your own version... When I compiled your source code
and transfered it to a TS-7200(onboard flash) the inverse is calculated
properly.
i.e.
#
/usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/arm-linux/bin/gcc
double.c -o double -lm
$ ./double 4
4 1/4.000000 = 0.250000
$ ./double 10
10 1/10.000000 = 0.100000
$ ./double 33
33 1/33.000000 = 0.030303
$ ./double 5
5 1/5.000000 = 0.200000
I have attached a binary version of your program(double). When you get a
chance could you try and run it on your TS-7200 and let me know if you
still get garbage data.
//Eddie
>
> A simple program that just calculates the inverse of numbers given on
> command line generates garbage......
>
> /* double.c
> */
>
> #include <math.h>
> #include <stdio.h>
>
> main(argc,argv)
> int argc;
> char **argv;
> {
> double da,b,c;
> int a;
>
> argv++; argc--;
> for ( ; argc; argc--) {
> a=atoi(*argv++);
> da=(double)a;
> printf("%3d 1/%f = %f\n",a,da,1.0/da);
> }
> }
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
double
Description: Binary data
|