diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-12-15 10:06:00 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-01-23 11:35:33 +0100 |
commit | 6ace2d5163bbc0b38d9982e04f3a4199c5fef315 (patch) | |
tree | 6f1e2d04a28ccead3d3b16e8361f0da5ba1f6313 | |
parent | 5faaac0a4c5593865a33a3080b4fd211feb51d31 (diff) | |
download | qemu-6ace2d5163bbc0b38d9982e04f3a4199c5fef315.zip qemu-6ace2d5163bbc0b38d9982e04f3a4199c5fef315.tar.gz qemu-6ace2d5163bbc0b38d9982e04f3a4199c5fef315.tar.bz2 |
target/i386: inline gen_jcc into sole caller
The code of gen_Jcc is very similar to gen_LOOP* and gen_JCXZ, but this
is hidden by gen_jcc.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Link: https://lore.kernel.org/r/20241215090613.89588-2-pbonzini@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | target/i386/tcg/emit.c.inc | 5 | ||||
-rw-r--r-- | target/i386/tcg/translate.c | 8 |
2 files changed, 4 insertions, 9 deletions
diff --git a/target/i386/tcg/emit.c.inc b/target/i386/tcg/emit.c.inc index c4cc5f4..a193d32 100644 --- a/target/i386/tcg/emit.c.inc +++ b/target/i386/tcg/emit.c.inc @@ -2297,8 +2297,11 @@ static void gen_IRET(DisasContext *s, X86DecodedInsn *decode) static void gen_Jcc(DisasContext *s, X86DecodedInsn *decode) { + TCGLabel *taken = gen_new_label(); + gen_bnd_jmp(s); - gen_jcc(s, decode->b & 0xf, decode->immediate); + gen_jcc1(s, decode->b & 0xf, taken); + gen_conditional_jump_labels(s, decode->immediate, NULL, taken); } static void gen_JCXZ(DisasContext *s, X86DecodedInsn *decode) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index dbc9d63..3b68441 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -1847,14 +1847,6 @@ static void gen_conditional_jump_labels(DisasContext *s, target_long diff, gen_jmp_rel(s, s->dflag, diff, 0); } -static void gen_jcc(DisasContext *s, int b, int diff) -{ - TCGLabel *l1 = gen_new_label(); - - gen_jcc1(s, b, l1); - gen_conditional_jump_labels(s, diff, NULL, l1); -} - static void gen_cmovcc1(DisasContext *s, int b, TCGv dest, TCGv src) { CCPrepare cc = gen_prepare_cc(s, b, NULL); |