target/i386: do not use gen_op_jz_ecx for repeated string operations
authorPaolo Bonzini <pbonzini@redhat.com>
Sun, 15 Dec 2024 09:06:08 +0000 (10:06 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Jan 2025 10:35:33 +0000 (11:35 +0100)
commit365811602572054b1c1173b19e8fd28689d827d9
tree476edcb0d99108e491db8c8c32402d203b070874
parent6986cf003226ddf7e5af36a9f4f033cb16c8636c
target/i386: do not use gen_op_jz_ecx for repeated string operations

Explicitly generate a TSTEQ branch (which is optimized to NE x,0 if possible).
This does not make much sense yet, but later we will add more checks and some
will use a temporary to check on the decremented value of CX/ECX/RCX; it will
be clearer for all checks to share the same logic using TSTEQ(reg, cx_mask).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Link: https://lore.kernel.org/r/20241215090613.89588-10-pbonzini@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/tcg/translate.c