[PATCH v2 8/8] target/i386: emulate: fix scas

Mohamed Mediouni posted 8 patches 1 day, 10 hours ago
[PATCH v2 8/8] target/i386: emulate: fix scas
Posted by Mohamed Mediouni 1 day, 10 hours ago
Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
---
 target/i386/emulate/x86_emu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/i386/emulate/x86_emu.c b/target/i386/emulate/x86_emu.c
index 6c4ccc4538..55b1a68eb6 100644
--- a/target/i386/emulate/x86_emu.c
+++ b/target/i386/emulate/x86_emu.c
@@ -745,6 +745,8 @@ static bool exec_scas(CPUX86State *env, struct x86_decode *decode)
 {
     decode->op[0].type = X86_VAR_REG;
     decode->op[0].reg = R_EAX;
+    decode->op[0].regptr = x86_reg(env, R_EAX);
+
     if (decode->rep) {
         string_rep(env, decode, exec_scas_single, decode->rep);
     } else {
-- 
2.50.1 (Apple Git-155)