mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 00:14:20 +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:
parent
a137530341
commit
ff5eccef96
@ -138,10 +138,16 @@ bool BytecodeWriter::outputConstant(const ConstPoolVal *CPV) {
|
||||
break;
|
||||
}
|
||||
|
||||
case Type::FloatTyID: // Floating point types...
|
||||
case Type::DoubleTyID:
|
||||
// TODO: Floating point type serialization
|
||||
|
||||
case Type::FloatTyID: { // Floating point types...
|
||||
float Tmp = (float)((const ConstPoolFP*)CPV)->getValue();
|
||||
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::LabelTyID:
|
||||
|
Loading…
x
Reference in New Issue
Block a user