From 55ed9fcf7a7f7c2d5a1ccf651c451a3754293c22 Mon Sep 17 00:00:00 2001 From: Anthony Printup <92564080+anthonyprintup@users.noreply.github.com> Date: Sun, 16 Jun 2024 22:50:14 +0200 Subject: [PATCH] Fixed missing handlers for LOOP/LOOPcc when building operands --- zasm/src/zasm/src/encoder/encoder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zasm/src/zasm/src/encoder/encoder.cpp b/zasm/src/zasm/src/encoder/encoder.cpp index d07c6ab..db6e909 100644 --- a/zasm/src/zasm/src/encoder/encoder.cpp +++ b/zasm/src/zasm/src/encoder/encoder.cpp @@ -202,7 +202,8 @@ namespace zasm // NOTE: Workaround for some instructions that only accept rel8 if (state.req.mnemonic == ZYDIS_MNEMONIC_JCXZ || state.req.mnemonic == ZYDIS_MNEMONIC_JECXZ - || state.req.mnemonic == ZYDIS_MNEMONIC_JKNZD) + || state.req.mnemonic == ZYDIS_MNEMONIC_JKNZD || state.req.mnemonic == ZYDIS_MNEMONIC_LOOP + || state.req.mnemonic == ZYDIS_MNEMONIC_LOOPE || state.req.mnemonic == ZYDIS_MNEMONIC_LOOPNE) { kTempRel = kTemporaryRel8Value; }