aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/arm/nwfpe/NOTES
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /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/NOTES29
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 @@
1There seems to be a problem with exp(double) and our emulator. I haven't
2been able to track it down yet. This does not occur with the emulator
3supplied by Russell King.
4
5I also found one oddity in the emulator. I don't think it is serious but
6will point it out. The ARM calling conventions require floating point
7registers f4-f7 to be preserved over a function call. The compiler quite
8often uses an stfe instruction to save f4 on the stack upon entry to a
9function, and an ldfe instruction to restore it before returning.
10
11I was looking at some code, that calculated a double result, stored it in f4
12then made a function call. Upon return from the function call the number in
13f4 had been converted to an extended value in the emulator.
14
15This is a side effect of the stfe instruction. The double in f4 had to be
16converted to extended, then stored. If an lfm/sfm combination had been used,
17then no conversion would occur. This has performance considerations. The
18result from the function call and f4 were used in a multiplication. If the
19emulator sees a multiply of a double and extended, it promotes the double to
20extended, then does the multiply in extended precision.
21
22This code will cause this problem:
23
24double x, y, z;
25z = log(x)/log(y);
26
27The result of log(x) (a double) will be calculated, returned in f0, then
28moved to f4 to preserve it over the log(y) call. The division will be done
29in extended precision, due to the stfe instruction used to save f4 in log(y).