Skip to content

Ghidra is a software reverse engineering (SRE) framework

x86: Allow repeated REP prefixes

Eric Kilmer3b0d7d34bf4c
diff --git a/Ghidra/Processors/x86/data/languages/ia.sinc b/Ghidra/Processors/x86/data/languages/ia.sinc
index e49582d9a2..44fba7c4d3 100644
--- a/Ghidra/Processors/x86/data/languages/ia.sinc
+++ b/Ghidra/Processors/x86/data/languages/ia.sinc
@@ -1508,8 +1508,8 @@ macro fucompe(val1, val2) {
:^instruction is instrPhase=0 & over=0x65; instruction [ segover=6; ] {} # GS override
:^instruction is instrPhase=0 & over=0x66; instruction [ opsize=opsize $xor 1; mandover = mandover $xor 1; ] {} # Operand size override
:^instruction is instrPhase=0 & over=0x67; instruction [ addrsize=addrsize $xor 1; ] {} # Address size override
-:^instruction is instrPhase=0 & over=0xf2; instruction [ repneprefx=1; ] {}
-:^instruction is instrPhase=0 & over=0xf3; instruction [ repprefx=1; ] {}
+:^instruction is instrPhase=0 & over=0xf2; instruction [ repneprefx=1; repprefx=0; ] {}
+:^instruction is instrPhase=0 & over=0xf3; instruction [ repneprefx=0; repprefx=1; ] {}
@ifdef IA64
#