diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
| commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
| tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /Documentation/arm/nwfpe/NOTES | |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'Documentation/arm/nwfpe/NOTES')
| -rw-r--r-- | Documentation/arm/nwfpe/NOTES | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Documentation/arm/nwfpe/NOTES b/Documentation/arm/nwfpe/NOTES new file mode 100644 index 000000000000..40577b5a49d3 --- /dev/null +++ b/Documentation/arm/nwfpe/NOTES | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | There seems to be a problem with exp(double) and our emulator. I haven't | ||
| 2 | been able to track it down yet. This does not occur with the emulator | ||
| 3 | supplied by Russell King. | ||
| 4 | |||
| 5 | I also found one oddity in the emulator. I don't think it is serious but | ||
| 6 | will point it out. The ARM calling conventions require floating point | ||
| 7 | registers f4-f7 to be preserved over a function call. The compiler quite | ||
| 8 | often uses an stfe instruction to save f4 on the stack upon entry to a | ||
| 9 | function, and an ldfe instruction to restore it before returning. | ||
| 10 | |||
| 11 | I was looking at some code, that calculated a double result, stored it in f4 | ||
| 12 | then made a function call. Upon return from the function call the number in | ||
| 13 | f4 had been converted to an extended value in the emulator. | ||
| 14 | |||
| 15 | This is a side effect of the stfe instruction. The double in f4 had to be | ||
| 16 | converted to extended, then stored. If an lfm/sfm combination had been used, | ||
| 17 | then no conversion would occur. This has performance considerations. The | ||
| 18 | result from the function call and f4 were used in a multiplication. If the | ||
| 19 | emulator sees a multiply of a double and extended, it promotes the double to | ||
| 20 | extended, then does the multiply in extended precision. | ||
| 21 | |||
| 22 | This code will cause this problem: | ||
| 23 | |||
| 24 | double x, y, z; | ||
| 25 | z = log(x)/log(y); | ||
| 26 | |||
| 27 | The result of log(x) (a double) will be calculated, returned in f0, then | ||
| 28 | moved to f4 to preserve it over the log(y) call. The division will be done | ||
| 29 | in extended precision, due to the stfe instruction used to save f4 in log(y). | ||
