qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/5] softmmu templates: optionally pass CPUState


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 2/5] softmmu templates: optionally pass CPUState to memory access functions
Date: Sun, 26 Aug 2012 00:28:39 +0100

On 24 August 2012 19:43, Andreas Färber <address@hidden> wrote:
> @Peter, have you looked into tcg/arm/ AREG0 support?

Currently working on a patch to fix things. Sneak preview,
setting up the helper arguments looks much nicer now:

    argreg = TCG_REG_R0;
#if CONFIG_TCG_PASS_AREG0
    argreg = tcg_out_arg_reg32(s, argreg, TCG_AREG0);
#endif
#if TARGET_LONG_BITS == 64
    argreg = tcg_out_arg_reg64(s, argreg, addr_reg, addr_reg2);
#else
    argreg = tcg_out_arg_reg32(s, argreg, addr_reg);
#endif

    switch (opc) {
    case 0:
        argreg = tcg_out_arg_reg8(s, argreg, data_reg);
        break;
    case 1:
        argreg = tcg_out_arg_reg16(s, argreg, data_reg);
        break;
    case 2:
        argreg = tcg_out_arg_reg32(s, argreg, data_reg);
        break;
    case 3:
        argreg = tcg_out_arg_reg64(s, argreg, data_reg, data_reg2);
        break;
    }

    argreg = tcg_out_imm32(s, argreg, mem_index);
    tcg_out_call(s, (tcg_target_long) qemu_st_helpers[s_bits]);
    tcg_out_arg_stacktidy(s, argreg);

(the tcg_out_arg* hide aligning to regpair and whether
we need to put the argument on the stack, etc).

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]