> AMD SC410, which lack Floating Point Unit? (We designed a board with that
> processor but since it's got so poor address decoding options (very few
> programmable chipselects) we ditched it and went with the SC520 instead (FPU
> included).)
>
> <...>I am seeing following
> > weirdness for compute intensive pieces of code:
> >
> > double x = 3.4;
> > doubly y = 5.67;
> > for (long i=1; i<10000; i++) {
> > double z = x+y;
> > }
> >
> >
> > The above piece of code takes 2 seconds to 3 seconds.
> > But if I surround the above piece of code with: asm("cli") and asm("sti")
> > i.e. turn of interrupts, it takes only 9 milliseconds.
But when you are using cli/sti is it doing anything?
change it to:
double x = 3.4;
double y = 5.67;
double z = 0.0;
for (long i=1; i<10000; i++) {
z += x+y;
}
printf("%lf\n",z);
and test then with and without cli/sti
Best regards,
--
Tomek
--
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.