Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-0_emteere minor SleighEditor bug fix for @if "!=" comparison

emteereb966f85f7613
diff --git a/GhidraBuild/EclipsePlugins/GhidraSleighEditor/ghidra.xtext.sleigh.tests/src/ghidra/xtext/sleigh/tests/SleighParsingTest.xtend b/GhidraBuild/EclipsePlugins/GhidraSleighEditor/ghidra.xtext.sleigh.tests/src/ghidra/xtext/sleigh/tests/SleighParsingTest.xtend
index a2a075d8b9..78fe1f8c26 100644
--- a/GhidraBuild/EclipsePlugins/GhidraSleighEditor/ghidra.xtext.sleigh.tests/src/ghidra/xtext/sleigh/tests/SleighParsingTest.xtend
+++ b/GhidraBuild/EclipsePlugins/GhidraSleighEditor/ghidra.xtext.sleigh.tests/src/ghidra/xtext/sleigh/tests/SleighParsingTest.xtend
@@ -110,6 +110,9 @@ class SleighParsingTest {
@if defined(ENDIAN)
reg = tmp;
@endif
+ @if ENDIAN != "big"
+ reg = N;
+ @endif
}
Dest: loc is op=0 [ loc = inst_next; ] { export loc; }
diff --git a/GhidraBuild/EclipsePlugins/GhidraSleighEditor/ghidra.xtext.sleigh/src/ghidra/xtext/sleigh/Sleigh.xtext b/GhidraBuild/EclipsePlugins/GhidraSleighEditor/ghidra.xtext.sleigh/src/ghidra/xtext/sleigh/Sleigh.xtext
index 844e1df12f..3b7deffd51 100644
--- a/GhidraBuild/EclipsePlugins/GhidraSleighEditor/ghidra.xtext.sleigh/src/ghidra/xtext/sleigh/Sleigh.xtext
+++ b/GhidraBuild/EclipsePlugins/GhidraSleighEditor/ghidra.xtext.sleigh/src/ghidra/xtext/sleigh/Sleigh.xtext
@@ -49,6 +49,7 @@ IsDefined:
DefineTest:
( '(' test=DefineTest ')'
| symref=DefineSym OP_EQUAL value=(STRING|intvalue|ID)
+ | symref=DefineSym OP_NOTEQUAL value=(STRING|intvalue|ID)
| isdefined=IsDefined ) ( (OP_BOOL_AND andtest=DefineTest) | (OP_BOOL_OR ortest=DefineTest) )?
;