mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 12:00:04 +02:00
Merge remote-tracking branch
'origin/GP-1132_ghidorahrex_sla_endian_mismatch_error--SQUASHED' (Closes #3215)
This commit is contained in:
commit
cd5711cd91
1 changed files with 7 additions and 7 deletions
|
@ -899,13 +899,13 @@ public class SleighLanguage implements Language {
|
||||||
if (version != SLA_FORMAT_VERSION) {
|
if (version != SLA_FORMAT_VERSION) {
|
||||||
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"));
|
String endianAttr = el.getAttribute("bigendian");
|
||||||
if (isBigEndian ^ description.getEndian().isBigEndian()) {
|
Endian slaEndian = SpecXmlUtils.decodeBoolean(endianAttr) ? Endian.BIG : Endian.LITTLE;
|
||||||
if (description.getInstructionEndian().isBigEndian() == description.getEndian()
|
Endian ldefEndian = description.getEndian();
|
||||||
.isBigEndian()) {
|
Endian instEndian = description.getInstructionEndian();
|
||||||
|
if (slaEndian != ldefEndian && instEndian == ldefEndian) {
|
||||||
throw new SleighException(".ldefs says " + getLanguageID() + " is " +
|
throw new SleighException(".ldefs says " + getLanguageID() + " is " +
|
||||||
description.getEndian() + " but .sla says " + el.getAttribute("bigendian"));
|
ldefEndian + " but .sla says " + slaEndian);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
uniqueBase = SpecXmlUtils.decodeLong(el.getAttribute("uniqbase"));
|
uniqueBase = SpecXmlUtils.decodeLong(el.getAttribute("uniqbase"));
|
||||||
alignment = SpecXmlUtils.decodeInt(el.getAttribute("align"));
|
alignment = SpecXmlUtils.decodeInt(el.getAttribute("align"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue