diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-03-16 09:42:40 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-03-16 09:42:40 +0000 |
commit | a8f1b43cb023333098a3ebc2630ce2c3db7f7af6 (patch) | |
tree | 051e8e211fb02d8ff2feead68df562859a4a3632 /tcg/tci/tcg-target.c | |
parent | 7ccfb495c64e1eef5886dcc4d48523ed6d1d22a4 (diff) | |
parent | 37ed3bf1ee07bb1a26adca0df8718f601f231c0b (diff) |
Merge remote-tracking branch 'remotes/rth/tags/tcg-pull-20150313' into staging
Pool TCG data, and ALWAYS/NEVER fix
# gpg: Signature made Fri Mar 13 20:09:09 2015 GMT using RSA key ID 4DD0279B
# gpg: Good signature from "Richard Henderson <rth7680@gmail.com>"
# gpg: aka "Richard Henderson <rth@redhat.com>"
# gpg: aka "Richard Henderson <rth@twiddle.net>"
* remotes/rth/tags/tcg-pull-20150313:
tcg: Complete handling of ALWAYS and NEVER
tcg: Use tcg_malloc to allocate TCGLabel
tcg: Change generator-side labels to a pointer
tcg: Change translator-side labels to a pointer
tcg-ia64: Use tcg_malloc to allocate TCGLabelQemuLdst
tcg: Use tcg_malloc to allocate TCGLabelQemuLdst
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tcg/tci/tcg-target.c')
-rw-r--r-- | tcg/tci/tcg-target.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tcg/tci/tcg-target.c b/tcg/tci/tcg-target.c index 03a7b46958..fb2339dcdf 100644 --- a/tcg/tci/tcg-target.c +++ b/tcg/tci/tcg-target.c @@ -460,14 +460,13 @@ static void tcg_out_ri64(TCGContext *s, int const_arg, TCGArg arg) #endif /* Write label. */ -static void tci_out_label(TCGContext *s, TCGArg arg) +static void tci_out_label(TCGContext *s, TCGLabel *label) { - TCGLabel *label = &s->labels[arg]; if (label->has_value) { tcg_out_i(s, label->u.value); assert(label->u.value); } else { - tcg_out_reloc(s, s->code_ptr, sizeof(tcg_target_ulong), arg, 0); + tcg_out_reloc(s, s->code_ptr, sizeof(tcg_target_ulong), label, 0); s->code_ptr += sizeof(tcg_target_ulong); } } @@ -565,7 +564,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, s->tb_next_offset[args[0]] = tcg_current_code_size(s); break; case INDEX_op_br: - tci_out_label(s, args[0]); + tci_out_label(s, arg_label(args[0])); break; case INDEX_op_setcond_i32: tcg_out_r(s, args[0]); @@ -689,7 +688,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, tcg_out_r(s, args[0]); tcg_out_ri64(s, const_args[1], args[1]); tcg_out8(s, args[2]); /* condition */ - tci_out_label(s, args[3]); + tci_out_label(s, arg_label(args[3])); break; case INDEX_op_bswap16_i64: /* Optional (TCG_TARGET_HAS_bswap16_i64). */ case INDEX_op_bswap32_i64: /* Optional (TCG_TARGET_HAS_bswap32_i64). */ @@ -742,7 +741,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, tcg_out_ri32(s, const_args[2], args[2]); tcg_out_ri32(s, const_args[3], args[3]); tcg_out8(s, args[4]); /* condition */ - tci_out_label(s, args[5]); + tci_out_label(s, arg_label(args[5])); break; case INDEX_op_mulu2_i32: tcg_out_r(s, args[0]); @@ -755,7 +754,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, tcg_out_r(s, args[0]); tcg_out_ri32(s, const_args[1], args[1]); tcg_out8(s, args[2]); /* condition */ - tci_out_label(s, args[3]); + tci_out_label(s, arg_label(args[3])); break; case INDEX_op_qemu_ld_i32: tcg_out_r(s, *args++); |