]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
VEX/priv/host_arm_isel.c (doHelperCall): Fix nextArgReg guard
authorMark Wielaard <mark@klomp.org>
Tue, 2 Jul 2024 14:47:19 +0000 (16:47 +0200)
committerMark Wielaard <mark@klomp.org>
Tue, 2 Jul 2024 14:47:22 +0000 (16:47 +0200)
We need two args, so change the guard to nextArgReg + 1 >= ARM_N_ARGREGS.

VEX/priv/host_arm_isel.c

index 8b3264843891f8fcd35a014dccffa8db688a67de..d19efe5c3ebbf6b00602e998bcaaf2fc2f22a511 100644 (file)
@@ -683,7 +683,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
                addInstr(env, ARMInstr_Imm32( argregs[nextArgReg], 0xAA ));
                nextArgReg++;
             }
-            if (nextArgReg >= ARM_N_ARGREGS)
+            if (nextArgReg + 1 >= ARM_N_ARGREGS)
                return False; /* out of argregs */
             HReg raHi, raLo;
             iselInt64Expr(&raHi, &raLo, env, arg);