aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2004-07-28 19:16:10 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2004-07-28 19:16:10 +0000
commit8b88d906a2a5bd4a6824c83ae1ee4f3aae54664d (patch)
tree37cac218b53ac52621da3e04f0b8e67be98a4b52 /lib
parenta0af38c46a665a58c733062955e1cb7f244569f7 (diff)
Add notes on bug involving casting ulong -> double, thanks to Nate Begeman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15307 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/PowerPC/README.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/README.txt b/lib/Target/PowerPC/README.txt
index e11449efdf..d881fc9a24 100644
--- a/lib/Target/PowerPC/README.txt
+++ b/lib/Target/PowerPC/README.txt
@@ -6,6 +6,23 @@ Current bugs:
* large fixed-size allocas not correct, although should
be closer to working. Added code in PPCRegisterInfo.cpp
to do >16bit subtractions to the stack pointer.
+* ulong to double. ahhh, here's the problem:
+ floatdidf assumes signed longs. so if the high but of a ulong
+ just happens to be set, you get the wrong sign. The fix for this
+ is to call cmpdi2 to compare against zero, if so shift right by one,
+ convert to fp, and multiply by (add to itself). the sequence would
+ look like:
+ {r3:r4} holds ulong a;
+ li r5, 0
+ li r6, 0 (set r5:r6 to ulong 0)
+ call cmpdi2 ==> sets r3 <, =, > 0
+ if r3 > 0
+ call floatdidf as usual
+ else
+ shift right ulong a, 1 (we could use emitShift)
+ call floatdidf
+ fadd f1, f1, f1 (fp left shift by 1)
+* linking llvmg++ .s files with gcc instead of g++
Codegen improvements needed:
* no alias analysis causes us to generate slow code for Shootout/matrix