aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-10-11 18:07:22 +0000
committerDale Johannesen <dalej@apple.com>2007-10-11 18:07:22 +0000
commita471c2ecda37cd1bae0d94e832f002caa7b63216 (patch)
tree5585aa5c69106bf208bebbc089dccd54bd09154b /lib/VMCore/AsmWriter.cpp
parentf9193de25bcd2c7de6c7d60ec5992f546907231a (diff)
Next PPC long double bits. First cut at constants.
No compile-time support for constant operations yet, just format transformations. Make readers and writers work. Split constants into 2 doubles in Legalize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-rw-r--r--lib/VMCore/AsmWriter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 6fb55165be..9592151c6d 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -519,6 +519,8 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV,
Out << 'K';
else if (&CFP->getValueAPF().getSemantics() == &APFloat::IEEEquad)
Out << 'L';
+ else if (&CFP->getValueAPF().getSemantics() == &APFloat::PPCDoubleDouble)
+ Out << 'M';
else
assert(0 && "Unsupported floating point type");
// api needed to prevent premature destruction
@@ -526,7 +528,7 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV,
const uint64_t* p = api.getRawData();
uint64_t word = *p;
int shiftcount=60;
- int width = CFP->getValueAPF().convertToAPInt().getBitWidth();
+ int width = api.getBitWidth();
for (int j=0; j<width; j+=4, shiftcount-=4) {
unsigned int nibble = (word>>shiftcount) & 15;
if (nibble < 10)
@@ -535,7 +537,7 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV,
Out << (unsigned char)(nibble - 10 + 'A');
if (shiftcount == 0) {
word = *(++p);
- shiftcount = 60;
+ shiftcount = 64;
if (width-j-4 < 64)
shiftcount = width-j-4;
}