|
From: Julian S. <se...@so...> - 2018-02-16 07:05:11
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=6ae2edea014669d8082747f0f268e9404e0fd296 commit 6ae2edea014669d8082747f0f268e9404e0fd296 Author: Julian Seward <js...@ac...> Date: Fri Feb 16 08:02:00 2018 +0100 Bug 384930 - Valgrind fails to compute correctly some code using the GMP library. For the ADCX and ADOX instructions, the VEX front end failed to create a PUT to the result register in the case where one of the operands is from memory, for example in adoxq 48(%rdi),%r12 where %r12 is never written. This commit fixes it. Diff: --- VEX/priv/guest_amd64_toIR.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VEX/priv/guest_amd64_toIR.c b/VEX/priv/guest_amd64_toIR.c index d00f453..f462030 100644 --- a/VEX/priv/guest_amd64_toIR.c +++ b/VEX/priv/guest_amd64_toIR.c @@ -3080,12 +3080,12 @@ ULong dis_op2_E_G ( const VexAbiInfo* vbi, putIRegG(size, pfx, rm, mkexpr(dst1)); } else if (op8 == Iop_Add8 && flag == WithFlagCarryX) { - /* normal store */ helper_ADCX_ADOX( True/*isADCX*/, size, dst1, dst0, src ); + putIRegG(size, pfx, rm, mkexpr(dst1)); } else if (op8 == Iop_Add8 && flag == WithFlagOverX) { - /* normal store */ helper_ADCX_ADOX( False/*!isADCX*/, size, dst1, dst0, src ); + putIRegG(size, pfx, rm, mkexpr(dst1)); } else { assign( dst1, binop(mkSizedOp(ty,op8), mkexpr(dst0), mkexpr(src)) ); if (isAddSub(op8)) |