todo.rst 3.3 KB

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