[PATCH] target/i386/tcg: compute C of CC_OP_ADOX without going through helper

Paolo Bonzini posted 1 patch 1 week, 3 days ago
target/i386/tcg/translate.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] target/i386/tcg: compute C of CC_OP_ADOX without going through helper
Posted by Paolo Bonzini 1 week, 3 days ago
With the CC_OP_ADOX cc_op, the carry flag remains in CC_SRC just like
with CC_OP_EFLAGS.  Add CC_OP_ADOX to the same gen_prepare_eflags_c
fast path as CC_OP_EFLAGS, to avoid generating a helper call.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/tcg/translate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index d8de290acb6..d13e8cdf3f0 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -924,6 +924,7 @@ static CCPrepare gen_prepare_eflags_c(DisasContext *s, TCGv reg)
                              .rhs_type = CC_PREPARE_DIRECT };
 
     case CC_OP_EFLAGS:
+    case CC_OP_ADOX:
     case CC_OP_SARB ... CC_OP_SARQ:
         /* CC_SRC & 1 */
         return (CCPrepare) { .cond = TCG_COND_TSTNE,
-- 
2.55.0
Re: [PATCH] target/i386/tcg: compute C of CC_OP_ADOX without going through helper
Posted by Richard Henderson 1 week, 2 days ago
On 9/16/26 03:30, Paolo Bonzini wrote:
> With the CC_OP_ADOX cc_op, the carry flag remains in CC_SRC just like
> with CC_OP_EFLAGS.  Add CC_OP_ADOX to the same gen_prepare_eflags_c
> fast path as CC_OP_EFLAGS, to avoid generating a helper call.
> 
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   target/i386/tcg/translate.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~