mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-03 11:23:58 +00:00
Add support to the bytecode writer to recognize floating point constants
llvm-svn: 190
This commit is contained in:
parent
f435e200b1
commit
4d44c2ba81
@ -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…
Reference in New Issue
Block a user