Subject: Re: Re: speedy FP
To: Richard Earnshaw <rearnsha@armltd.co.uk>
From: Peter Berg <Peter.Berg@ww.tu-freiberg.de>
List: port-arm32
Date: 04/10/1997 21:49:12
> > =
> > Just wondering if my idea can be applied to RiscBSD - I don't know a=
bout how =
> > the ARM FPE works, but this should considerably reduce the amount of =
time spent =
> > in the kernel by FP intensive apps.
> > =
> > For those who don't frequent c.s.a.programmer, my idea is essentially=
to =
> > have the handler for the FP instruction exception trap decode the arg=
uments, =
> > put them in a table indexed by address then overwrite the FP instruct=
ion with a =
> > BL to some handler routine which would then pick the results from the=
table and =
> > emulate the instruction. This should produce a considerable increase=
in speed =
> > and reduction of time spent in SVC mode.
> > =
You can't precalculate all results. This only works for trigonimetric =
functions with a tolerable amount of arraysize.
The most overhead currently is trap and interupt handling I guess. This c=
an be =
avoided if you write the softfloat library for the gcc which is still mis=
sing. =
But this must provide *all* floatingpoint operations (mainly +,-,*,/).
A other way is to use builtin functions and map the original calls to you=
r =
functions like
#define sin(a) _mysinfunc(a)
where _mysinfunc() is your array using functions. This way you can substi=
tite =
them step-by-step and the result is the same, but it will only work with =
selfcompiled programs.
Ciao, Peter
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/=
\/\
| =
|
| >>> FutureGroove <<< =
|
| =
|
| Peter Berg Music production & =
|
| softwaredevelopment =
|
| w3: http://www.ww.tu-freiberg.de/~pberg =
|
| email: Peter.Berg@ww.tu-freiberg.de =
|
| part time system administrato=
r |
| at *.ww.tu-freiberg.d=
e |
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\=
/\/