From 9ecefc84dd12af07394575a75f0689dc748eea78 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 3 Oct 2013 14:51:24 -0500 Subject: tcg: Add tcg-be-ldst.h Move TCGLabelQemuLdst and related stuff out of tcg.h. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'tcg/aarch64') diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index 78e1443808..04d7ae328d 100644 --- a/tcg/aarch64/tcg-target.c +++ b/tcg/aarch64/tcg-target.c @@ -10,6 +10,7 @@ * See the COPYING file in the top-level directory for details. */ +#include "tcg-be-ldst.h" #include "qemu/bitops.h" #ifndef NDEBUG @@ -834,33 +835,13 @@ static void tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *lb) tcg_out_goto(s, (tcg_target_long)lb->raddr); } -void tcg_out_tb_finalize(TCGContext *s) -{ - int i; - for (i = 0; i < s->nb_qemu_ldst_labels; i++) { - TCGLabelQemuLdst *label = &s->qemu_ldst_labels[i]; - if (label->is_ld) { - tcg_out_qemu_ld_slow_path(s, label); - } else { - tcg_out_qemu_st_slow_path(s, label); - } - } -} - static void add_qemu_ldst_label(TCGContext *s, int is_ld, int opc, TCGReg data_reg, TCGReg addr_reg, int mem_index, uint8_t *raddr, uint8_t *label_ptr) { - int idx; - TCGLabelQemuLdst *label; - - if (s->nb_qemu_ldst_labels >= TCG_MAX_QEMU_LDST) { - tcg_abort(); - } + TCGLabelQemuLdst *label = new_ldst_label(s); - idx = s->nb_qemu_ldst_labels++; - label = &s->qemu_ldst_labels[idx]; label->is_ld = is_ld; label->opc = opc; label->datalo_reg = data_reg; -- cgit v1.2.1