mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Add support for assembly printing fp constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ff5eccef96
commit
a59c266d84
@ -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:
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user