mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +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) {
|
||||
throw new SleighException(".sla file for " + getLanguageID() + " has the wrong format");
|
||||
}
|
||||
boolean isBigEndian = SpecXmlUtils.decodeBoolean(el.getAttribute("bigendian"));
|
||||
if (isBigEndian ^ description.getEndian().isBigEndian()) {
|
||||
if (description.getInstructionEndian().isBigEndian() == description.getEndian()
|
||||
.isBigEndian()) {
|
||||
throw new SleighException(".ldefs says " + getLanguageID() + " is " +
|
||||
description.getEndian() + " but .sla says " + el.getAttribute("bigendian"));
|
||||
}
|
||||
String endianAttr = el.getAttribute("bigendian");
|
||||
Endian slaEndian = SpecXmlUtils.decodeBoolean(endianAttr) ? Endian.BIG : Endian.LITTLE;
|
||||
Endian ldefEndian = description.getEndian();
|
||||
Endian instEndian = description.getInstructionEndian();
|
||||
if (slaEndian != ldefEndian && instEndian == ldefEndian) {
|
||||
throw new SleighException(".ldefs says " + getLanguageID() + " is " +
|
||||
ldefEndian + " but .sla says " + slaEndian);
|
||||
}
|
||||
uniqueBase = SpecXmlUtils.decodeLong(el.getAttribute("uniqbase"));
|
||||
alignment = SpecXmlUtils.decodeInt(el.getAttribute("align"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue