[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/24] target/ppc: Use tcg_gen_lookup_and_goto_ptr
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 01/24] target/ppc: Use tcg_gen_lookup_and_goto_ptr |
Date: |
Fri, 15 Dec 2017 16:54:12 +1100 |
From: Richard Henderson <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Daniel Henrique Barboza <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target/ppc/translate.c | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 998fbed848..4075fc8589 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -3419,7 +3419,7 @@ static inline bool use_goto_tb(DisasContext *ctx,
target_ulong dest)
}
/*** Branch ***/
-static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
+static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
{
if (NARROW_MODE(ctx)) {
dest = (uint32_t) dest;
@@ -3441,7 +3441,7 @@ static inline void gen_goto_tb(DisasContext *ctx, int n,
target_ulong dest)
gen_debug_exception(ctx);
}
}
- tcg_gen_exit_tb(0);
+ tcg_gen_lookup_and_goto_ptr();
}
}
@@ -3479,7 +3479,7 @@ static void gen_b(DisasContext *ctx)
#define BCOND_CTR 2
#define BCOND_TAR 3
-static inline void gen_bcond(DisasContext *ctx, int type)
+static void gen_bcond(DisasContext *ctx, int type)
{
uint32_t bo = BO(ctx->opcode);
TCGLabel *l1;
@@ -3543,26 +3543,19 @@ static inline void gen_bcond(DisasContext *ctx, int
type)
} else {
gen_goto_tb(ctx, 0, li);
}
- if ((bo & 0x14) != 0x14) {
- gen_set_label(l1);
- gen_goto_tb(ctx, 1, ctx->nip);
- }
} else {
if (NARROW_MODE(ctx)) {
tcg_gen_andi_tl(cpu_nip, target, (uint32_t)~3);
} else {
tcg_gen_andi_tl(cpu_nip, target, ~3);
}
- tcg_gen_exit_tb(0);
- if ((bo & 0x14) != 0x14) {
- gen_set_label(l1);
- gen_update_nip(ctx, ctx->nip);
- tcg_gen_exit_tb(0);
- }
- }
- if (type == BCOND_LR || type == BCOND_CTR || type == BCOND_TAR) {
+ tcg_gen_lookup_and_goto_ptr();
tcg_temp_free(target);
}
+ if ((bo & 0x14) != 0x14) {
+ gen_set_label(l1);
+ gen_goto_tb(ctx, 1, ctx->nip);
+ }
}
static void gen_bc(DisasContext *ctx)
--
2.14.3
- [Qemu-devel] [PULL 00/24] ppc-for-2.12 queue 20171215, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 01/24] target/ppc: Use tcg_gen_lookup_and_goto_ptr,
David Gibson <=
- [Qemu-devel] [PULL 02/24] ppc/xics: remove useless if condition, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 03/24] spapr: Add pseries-2.12 machine type, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 04/24] spapr_cpu_core: instantiate CPUs separately, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 06/24] nvram: add AT24Cx i2c eeprom, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 05/24] e500: name openpic and pci host bridge, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 10/24] spapr/rtas: disable the decrementer interrupt when a CPU is unplugged, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 12/24] spapr/rtas: do not reset the MSR in stop-self command, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 09/24] e500: fix pci host bridge class/type, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 16/24] spapr: introduce a spapr_irq_set_lsi() helper, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 13/24] ppc/xics: introduce an icp_create() helper, David Gibson, 2017/12/15