TODO 3.3 KB

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