]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - Documentation/arm/nwfpe/todo.rst
docs: arm: convert docs to ReST and rename to *.rst
[mirror_ubuntu-focal-kernel.git] / Documentation / arm / nwfpe / todo.rst
CommitLineData
1da177e4 1TODO LIST
dc7a12bd 2=========
1da177e4 3
dc7a12bd 4::
1da177e4 5
dc7a12bd
MCC
6 POW{cond}<S|D|E>{P,M,Z} Fd, Fn, <Fm,#value> - power
7 RPW{cond}<S|D|E>{P,M,Z} Fd, Fn, <Fm,#value> - reverse power
8 POL{cond}<S|D|E>{P,M,Z} Fd, Fn, <Fm,#value> - polar angle (arctan2)
9
10 LOG{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - logarithm to base 10
11 LGN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - logarithm to base e
12 EXP{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - exponent
13 SIN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - sine
14 COS{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - cosine
15 TAN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - tangent
16 ASN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - arcsine
17 ACS{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - arccosine
18 ATN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - arctangent
1da177e4
LT
19
20These are not implemented. They are not currently issued by the compiler,
21and are handled by routines in libc. These are not implemented by the FPA11
dc7a12bd 22hardware, but are handled by the floating point support code. They should
1da177e4
LT
23be implemented in future versions.
24
25There are a couple of ways to approach the implementation of these. One
dc7a12bd 26method would be to use accurate table methods for these routines. I have
1da177e4
LT
27a couple of papers by S. Gal from IBM's research labs in Haifa, Israel that
28seem to promise extreme accuracy (in the order of 99.8%) and reasonable speed.
29These methods are used in GLIBC for some of the transcendental functions.
30
31Another approach, which I know little about is CORDIC. This stands for
dc7a12bd 32Coordinate Rotation Digital Computer, and is a method of computing
1da177e4
LT
33transcendental functions using mostly shifts and adds and a few
34multiplications and divisions. The ARM excels at shifts and adds,
dc7a12bd 35so such a method could be promising, but requires more research to
1da177e4
LT
36determine if it is feasible.
37
38Rounding Methods
dc7a12bd 39----------------
1da177e4
LT
40
41The IEEE standard defines 4 rounding modes. Round to nearest is the
42default, but rounding to + or - infinity or round to zero are also allowed.
43Many architectures allow the rounding mode to be specified by modifying bits
44in a control register. Not so with the ARM FPA11 architecture. To change
45the rounding mode one must specify it with each instruction.
46
47This has made porting some benchmarks difficult. It is possible to
dc7a12bd
MCC
48introduce such a capability into the emulator. The FPCR contains
49bits describing the rounding mode. The emulator could be altered to
1da177e4
LT
50examine a flag, which if set forced it to ignore the rounding mode in
51the instruction, and use the mode specified in the bits in the FPCR.
52
53This would require a method of getting/setting the flag, and the bits
54in the FPCR. This requires a kernel call in ArmLinux, as WFC/RFC are
55supervisor only instructions. If anyone has any ideas or comments I
56would like to hear them.
57
dc7a12bd
MCC
58NOTE:
59 pulled out from some docs on ARM floating point, specifically
1da177e4
LT
60 for the Acorn FPE, but not limited to it:
61
62 The floating point control register (FPCR) may only be present in some
63 implementations: it is there to control the hardware in an implementation-
64 specific manner, for example to disable the floating point system. The user
65 mode of the ARM is not permitted to use this register (since the right is
66 reserved to alter it between implementations) and the WFC and RFC
67 instructions will trap if tried in user mode.
68
69 Hence, the answer is yes, you could do this, but then you will run a high
70 risk of becoming isolated if and when hardware FP emulation comes out
dc7a12bd
MCC
71
72 -- Russell.