mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-30 10:55:48 +08:00
Disable SLEIGH endian check for mixed endian architectures
This commit is contained in:
+6
-4
@@ -888,11 +888,13 @@ public class SleighLanguage implements Language {
|
||||
throw new SleighException(".sla file for " + getLanguageID() + " has the wrong format");
|
||||
}
|
||||
boolean isBigEndian = SpecXmlUtils.decodeBoolean(el.getAttribute("bigendian"));
|
||||
// check the instruction endianess, not the program data endianess
|
||||
if (isBigEndian ^ description.getEndian().isBigEndian()) {
|
||||
throw new SleighException(
|
||||
".ldefs says " + getLanguageID() + " is " + description.getEndian() +
|
||||
" but .sla says " + el.getAttribute("bigendian"));
|
||||
if (description.getInstructionEndian().isBigEndian() == description.getEndian()
|
||||
.isBigEndian()) {
|
||||
throw new SleighException(
|
||||
".ldefs says " + getLanguageID() + " is " + description.getEndian() +
|
||||
" but .sla says " + el.getAttribute("bigendian"));
|
||||
}
|
||||
}
|
||||
uniqueBase = SpecXmlUtils.decodeLong(el.getAttribute("uniqbase"));
|
||||
alignment = SpecXmlUtils.decodeInt(el.getAttribute("align"));
|
||||
|
||||
Reference in New Issue
Block a user