summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-02-12 23:16:24 +0000
committerDale Johannesen <dalej@apple.com>2010-02-12 23:16:24 +0000
commit626b79d6a6450e2746f4872328b138a2bea2f6fb (patch)
treee5d28dbf3aa3997fa36e2ed65f949a0f356a86f6
parent741580a5bd0e497851998dd4ad5c6a220365cbb6 (diff)
downloadbcm5719-llvm-626b79d6a6450e2746f4872328b138a2bea2f6fb.tar.gz
bcm5719-llvm-626b79d6a6450e2746f4872328b138a2bea2f6fb.zip
Add the problem I just hacked around in 96015/96020.
The solution there produces correct code, but is seriously deficient in several ways. llvm-svn: 96039
-rw-r--r--llvm/lib/Target/PowerPC/README.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/README.txt b/llvm/lib/Target/PowerPC/README.txt
index 8f265cfc488..e49bda0fcd1 100644
--- a/llvm/lib/Target/PowerPC/README.txt
+++ b/llvm/lib/Target/PowerPC/README.txt
@@ -895,3 +895,20 @@ define double @test_FNEG_sel(double %A, double %B, double %C) {
ret double %E
}
+//===----------------------------------------------------------------------===//
+The save/restore sequence for CR in prolog/epilog is terrible:
+- Each CR subreg is saved individually, rather than doing one save as a unit.
+- On Darwin, the save is done after the decrement of SP, which means the offset
+from SP of the save slot can be too big for a store instruction, which means we
+need an additional register (currently hacked in 96015+96020; the solution there
+is correct, but poor).
+- On SVR4 the same thing can happen, and I don't think saving before the SP
+decrement is safe on that target, as there is no red zone. This is currently
+broken AFAIK, although it's not a target I can exercise.
+The following demonstrates the problem:
+extern void bar(char *p);
+void foo() {
+ char x[100000];
+ bar(x);
+ __asm__("" ::: "cr2");
+}
OpenPOWER on IntegriCloud