summaryrefslogtreecommitdiffstats
path: root/tcg/ppc
diff options
context:
space:
mode:
authorRichard Henderson2019-04-21 23:51:00 +0200
committerRichard Henderson2019-04-24 22:05:28 +0200
commitaeee05f53a5d67304a521d2644dc0a607e3c8b28 (patch)
tree39ee5d6b8c296c391f80e8be214f0bc09f6ef364 /tcg/ppc
parenttcg: Restart TB generation after constant pool overflow (diff)
downloadqemu-aeee05f53a5d67304a521d2644dc0a607e3c8b28.tar.gz
qemu-aeee05f53a5d67304a521d2644dc0a607e3c8b28.tar.xz
qemu-aeee05f53a5d67304a521d2644dc0a607e3c8b28.zip
tcg: Restart TB generation after out-of-line ldst overflow
This is part c of relocation overflow handling. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/ppc')
-rw-r--r--tcg/ppc/tcg-target.inc.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c
index 773690f1d9..c0923ced4f 100644
--- a/tcg/ppc/tcg-target.inc.c
+++ b/tcg/ppc/tcg-target.inc.c
@@ -1653,13 +1653,15 @@ static void add_qemu_ldst_label(TCGContext *s, bool is_ld, TCGMemOpIdx oi,
label->label_ptr[0] = lptr;
}
-static void tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)
+static bool tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)
{
TCGMemOpIdx oi = lb->oi;
TCGMemOp opc = get_memop(oi);
TCGReg hi, lo, arg = TCG_REG_R3;
- **lb->label_ptr |= reloc_pc14_val(*lb->label_ptr, s->code_ptr);
+ if (!reloc_pc14(lb->label_ptr[0], s->code_ptr)) {
+ return false;
+ }
tcg_out_mov(s, TCG_TYPE_PTR, arg++, TCG_AREG0);
@@ -1695,16 +1697,19 @@ static void tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)
}
tcg_out_b(s, 0, lb->raddr);
+ return true;
}
-static void tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)
+static bool tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)
{
TCGMemOpIdx oi = lb->oi;
TCGMemOp opc = get_memop(oi);
TCGMemOp s_bits = opc & MO_SIZE;
TCGReg hi, lo, arg = TCG_REG_R3;
- **lb->label_ptr |= reloc_pc14_val(*lb->label_ptr, s->code_ptr);
+ if (!reloc_pc14(lb->label_ptr[0], s->code_ptr)) {
+ return false;
+ }
tcg_out_mov(s, TCG_TYPE_PTR, arg++, TCG_AREG0);
@@ -1753,6 +1758,7 @@ static void tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)
tcg_out_call(s, qemu_st_helpers[opc & (MO_BSWAP | MO_SIZE)]);
tcg_out_b(s, 0, lb->raddr);
+ return true;
}
#endif /* SOFTMMU */