Disable SLEIGH endian check for mixed endian architectures

This commit is contained in:
caheckman
2020-10-21 11:39:09 -04:00
parent 1022be3a22
commit 797fb69005
@@ -888,11 +888,13 @@ public class SleighLanguage implements Language {
throw new SleighException(".sla file for " + getLanguageID() + " has the wrong format"); throw new SleighException(".sla file for " + getLanguageID() + " has the wrong format");
} }
boolean isBigEndian = SpecXmlUtils.decodeBoolean(el.getAttribute("bigendian")); boolean isBigEndian = SpecXmlUtils.decodeBoolean(el.getAttribute("bigendian"));
// check the instruction endianess, not the program data endianess
if (isBigEndian ^ description.getEndian().isBigEndian()) { if (isBigEndian ^ description.getEndian().isBigEndian()) {
throw new SleighException( if (description.getInstructionEndian().isBigEndian() == description.getEndian()
".ldefs says " + getLanguageID() + " is " + description.getEndian() + .isBigEndian()) {
" but .sla says " + el.getAttribute("bigendian")); throw new SleighException(
".ldefs says " + getLanguageID() + " is " + description.getEndian() +
" but .sla says " + el.getAttribute("bigendian"));
}
} }
uniqueBase = SpecXmlUtils.decodeLong(el.getAttribute("uniqbase")); uniqueBase = SpecXmlUtils.decodeLong(el.getAttribute("uniqbase"));
alignment = SpecXmlUtils.decodeInt(el.getAttribute("align")); alignment = SpecXmlUtils.decodeInt(el.getAttribute("align"));