diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-07-15 00:18:39 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-07-15 00:18:39 +0000 |
| commit | d06dd69e73d000d5c379d2fd59e20b4e57614cc0 (patch) | |
| tree | b516de0808d5a3aab6eb3c8eda9f4f3d93429a9a /llvm/lib | |
| parent | 4d44c2ba81749a5c1dfcaed7de58ef12efd6d2a2 (diff) | |
| download | bcm5719-llvm-d06dd69e73d000d5c379d2fd59e20b4e57614cc0.tar.gz bcm5719-llvm-d06dd69e73d000d5c379d2fd59e20b4e57614cc0.zip | |
Add support for assembly printing fp constants
llvm-svn: 191
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/ConstantPool.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/VMCore/iMemory.cpp | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/VMCore/ConstantPool.cpp b/llvm/lib/VMCore/ConstantPool.cpp index 7f2f30a6064..bb61b33f5e6 100644 --- a/llvm/lib/VMCore/ConstantPool.cpp +++ b/llvm/lib/VMCore/ConstantPool.cpp @@ -296,8 +296,7 @@ string ConstPoolUInt::getStrValue() const { } string ConstPoolFP::getStrValue() const { - assert(0 && "FP Constants Not implemented yet!!!!!!!!!!!"); - return "% FP Constants NI!" /* + dtostr(Val)*/; + return ftostr(Val); } string ConstPoolType::getStrValue() const { @@ -429,8 +428,8 @@ bool ConstPoolFP::isValueValidForType(const Type *Ty, double Val) { return false; // These can't be represented as floating point! // TODO: Figure out how to test if a double can be cast to a float! - /* case Type::FloatTyID: + /* return (Val <= UINT8_MAX); */ case Type::DoubleTyID: diff --git a/llvm/lib/VMCore/iMemory.cpp b/llvm/lib/VMCore/iMemory.cpp index a003e89a105..2f2c6c115ff 100644 --- a/llvm/lib/VMCore/iMemory.cpp +++ b/llvm/lib/VMCore/iMemory.cpp @@ -86,7 +86,9 @@ StoreInst::StoreInst(Value *Val, Value *Ptr, const vector<ConstPoolVal*> &Idx, GetElementPtrInst::GetElementPtrInst(Value *Ptr, const vector<ConstPoolVal*> &Idx, const string &Name = "") - : MemAccessInst(PointerType::getPointerType(getIndexedType(Ptr->getType(), Idx, true)), GetElementPtr, Name) { + : MemAccessInst(PointerType::getPointerType(getIndexedType(Ptr->getType(), + Idx, true)), + GetElementPtr, Name) { assert(getIndexedType(Ptr->getType(), Idx, true) && "gep operands invalid!"); Operands.reserve(1+Idx.size()); Operands.push_back(Use(Ptr, this)); |

