qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: Richard Henderson <rth@twiddle.net>, qemu-devel@nongnu.org
Cc: aurelien@aurel32.net
Subject: Re: [Qemu-devel] [PATCH 2.3 5/8] tcg: Put opcodes in a linked list
Date: Fri, 14 Nov 2014 15:03:25 +0000	[thread overview]
Message-ID: <546619BD.3040402@mail.uni-paderborn.de> (raw)
In-Reply-To: <1415723092-4088-6-git-send-email-rth@twiddle.net>


On 11/11/2014 04:24 PM, Richard Henderson wrote:
> +static void tcg_gen_op_begin(TCGContext *ctx, TCGOpcode opc, int args)
> +{
> +    int oi = ctx->gen_next_op_idx;
> +    int ni = oi + 1;
> +    int pi = oi - 1;
> +
> +    tcg_debug_assert(oi < OPC_BUF_SIZE);
> +    ctx->gen_last_op_idx = oi;
> +    ctx->gen_next_op_idx = ni;
> +
> +    ctx->gen_op_buf[oi] = (TCGOp){
> +        .opc = opc,
> +        .args = args,
> +        .prev = pi,
> +        .next = ni
> +    };
> +}
> +
The name of this function says begin while used at the end of each 
tcg_gen_op. How about tcg_gen_op_list_add?
> @@ -508,14 +521,10 @@ struct TCGContext {
>       int goto_tb_issue_mask;
>   #endif
>   
> -    uint16_t gen_opc_buf[OPC_BUF_SIZE];
> -    TCGArg gen_opparam_buf[OPPARAM_BUF_SIZE];
> -
> -    uint16_t *gen_opc_ptr;
> -    TCGArg *gen_opparam_ptr;
You forgot to remove gen_opc_ptr in the dummy function 
tcg_liveness_analysis, in case USE_LIVENESS_ANALYSIS is not defined.
> -    target_ulong gen_opc_pc[OPC_BUF_SIZE];
> -    uint16_t gen_opc_icount[OPC_BUF_SIZE];
> -    uint8_t gen_opc_instr_start[OPC_BUF_SIZE];
> +    int gen_first_op_idx;
> +    int gen_last_op_idx;
> +    int gen_next_op_idx;
> +    int gen_next_parm_idx;
>
Other than that it looks good to me.

Cheers,
Bastian

  reply	other threads:[~2014-11-14 14:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 16:24 [Qemu-devel] [PATCH 2.3 0/8] Linked list for tcg ops Richard Henderson
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 1/8] tcg: Move some opcode generation functions out of line Richard Henderson
2014-11-14 18:01   ` Bastian Koppelmann
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 2/8] tcg: Reduce ifdefs in tcg-op.c Richard Henderson
2014-11-14 18:20   ` Bastian Koppelmann
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 3/8] tcg: Move emit of INDEX_op_end into gen_tb_end Richard Henderson
2014-11-13 15:57   ` Bastian Koppelmann
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 4/8] tcg: Introduce tcg_op_buf_count and tcg_op_buf_full Richard Henderson
2014-11-13 16:13   ` Bastian Koppelmann
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 5/8] tcg: Put opcodes in a linked list Richard Henderson
2014-11-14 15:03   ` Bastian Koppelmann [this message]
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 6/8] tcg: Remove opcodes instead of noping them out Richard Henderson
2014-11-14 15:08   ` Bastian Koppelmann
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 7/8] tcg: Implement insert_op_before Richard Henderson
2014-11-14 15:25   ` Bastian Koppelmann
2014-11-14 14:46     ` Richard Henderson
2014-11-11 16:24 ` [Qemu-devel] [PATCH 2.3 8/8] tcg: Remove unused opcodes Richard Henderson
2014-11-14 15:31   ` Bastian Koppelmann
2014-11-14 14:47     ` Richard Henderson
2014-11-14 18:22 ` [Qemu-devel] [PATCH 2.3 0/8] Linked list for tcg ops Bastian Koppelmann
2015-01-03  8:46 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=546619BD.3040402@mail.uni-paderborn.de \
    --to=kbastian@mail.uni-paderborn.de \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).