Files
betterxen/crates
Bartosz Szczepański 149869a053 loader: run LOOP, LOOPE, LOOPNE and JRCXZ (#396)
The four rel8 forms E0 to E3 are declared in the instruction registry and
run through the shared semantics in both engines (Intel SDM Vol. 2A,
LOOP/LOOPcc and Jcc). The count is RCX: LOOP decrements it without
changing a flag and branches while the result is not zero, LOOPE also
needs ZF set and LOOPNE ZF clear, and JRCXZ branches on a zero RCX and
changes nothing. Each ends a translated block. The address-size prefix
stays rejected, so JECXZ and the ECX-counted forms are still refused.

The three known answers recorded as refused by #155 are verified, with
eleven more cases. tests/cpu_loop.rs checks a loop that spans translated
blocks against a step-by-step model for every count, ZF match point and
step budget, and JRCXZ against every single-bit RCX value.

Signed-off-by: Bartosz Szczepański <bartosz.szczepanski@hotmail.com>
2026-11-25 00:12:33 +01:00
..
2026-11-24 19:12:15 +00:00
2026-11-24 19:23:26 +00:00