GP-4285 Compressed SLEIGH

This commit is contained in:
caheckman 2024-01-10 22:53:12 +00:00
parent b380fd5fa6
commit 8fbd171cdf
207 changed files with 15233 additions and 6055 deletions

View file

@ -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