mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-4285 Compressed SLEIGH
This commit is contained in:
parent
b380fd5fa6
commit
8fbd171cdf
207 changed files with 15233 additions and 6055 deletions
|
@ -628,66 +628,4 @@ uintb FloatFormat::opRound(uintb a) const
|
|||
return getEncoding(round(val)); // round half away from zero
|
||||
}
|
||||
|
||||
/// Write the format out to a \<floatformat> XML tag.
|
||||
/// \param s is the output stream
|
||||
void FloatFormat::saveXml(ostream &s) const
|
||||
|
||||
{
|
||||
s << "<floatformat";
|
||||
a_v_i(s,"size",size);
|
||||
a_v_i(s,"signpos",signbit_pos);
|
||||
a_v_i(s,"fracpos",frac_pos);
|
||||
a_v_i(s,"fracsize",frac_size);
|
||||
a_v_i(s,"exppos",exp_pos);
|
||||
a_v_i(s,"expsize",exp_size);
|
||||
a_v_i(s,"bias",bias);
|
||||
a_v_b(s,"jbitimplied",jbitimplied);
|
||||
s << "/>\n";
|
||||
}
|
||||
|
||||
/// Restore \b object from a \<floatformat> XML tag
|
||||
/// \param el is the element
|
||||
void FloatFormat::restoreXml(const Element *el)
|
||||
|
||||
{
|
||||
{
|
||||
istringstream s(el->getAttributeValue("size"));
|
||||
s.unsetf(ios::dec | ios::hex | ios::oct);
|
||||
s >> size;
|
||||
}
|
||||
{
|
||||
istringstream s(el->getAttributeValue("signpos"));
|
||||
s.unsetf(ios::dec | ios::hex | ios::oct);
|
||||
s >> signbit_pos;
|
||||
}
|
||||
{
|
||||
istringstream s(el->getAttributeValue("fracpos"));
|
||||
s.unsetf(ios::dec | ios::hex | ios::oct);
|
||||
s >> frac_pos;
|
||||
}
|
||||
{
|
||||
istringstream s(el->getAttributeValue("fracsize"));
|
||||
s.unsetf(ios::dec | ios::hex | ios::oct);
|
||||
s >> frac_size;
|
||||
}
|
||||
{
|
||||
istringstream s(el->getAttributeValue("exppos"));
|
||||
s.unsetf(ios::dec | ios::hex | ios::oct);
|
||||
s >> exp_pos;
|
||||
}
|
||||
{
|
||||
istringstream s(el->getAttributeValue("expsize"));
|
||||
s.unsetf(ios::dec | ios::hex | ios::oct);
|
||||
s >> exp_size;
|
||||
}
|
||||
{
|
||||
istringstream s(el->getAttributeValue("bias"));
|
||||
s.unsetf(ios::dec | ios::hex | ios::oct);
|
||||
s >> bias;
|
||||
}
|
||||
jbitimplied = xml_readbool(el->getAttributeValue("jbitimplied"));
|
||||
maxexponent = (1<<exp_size)-1;
|
||||
calcPrecision();
|
||||
}
|
||||
|
||||
} // End namespace ghidra
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue