mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
Add support to the bytecode writer to recognize floating point constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -138,10 +138,16 @@ bool BytecodeWriter::outputConstant(const ConstPoolVal *CPV) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case Type::FloatTyID: // Floating point types...
|
case Type::FloatTyID: { // Floating point types...
|
||||||
case Type::DoubleTyID:
|
float Tmp = (float)((const ConstPoolFP*)CPV)->getValue();
|
||||||
// TODO: Floating point type serialization
|
output_data(&Tmp, &Tmp+1, Out);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Type::DoubleTyID: {
|
||||||
|
double Tmp = ((const ConstPoolFP*)CPV)->getValue();
|
||||||
|
output_data(&Tmp, &Tmp+1, Out);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case Type::VoidTyID:
|
case Type::VoidTyID:
|
||||||
case Type::LabelTyID:
|
case Type::LabelTyID:
|
||||||
|
Reference in New Issue
Block a user