From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpHSl-0004hU-IW for qemu-devel@nongnu.org; Fri, 14 Nov 2014 09:03:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpHSf-0003Ol-C3 for qemu-devel@nongnu.org; Fri, 14 Nov 2014 09:02:59 -0500 Received: from mail.uni-paderborn.de ([131.234.142.9]:41360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpHSf-0003Ob-5x for qemu-devel@nongnu.org; Fri, 14 Nov 2014 09:02:53 -0500 Message-ID: <546619BD.3040402@mail.uni-paderborn.de> Date: Fri, 14 Nov 2014 15:03:25 +0000 From: Bastian Koppelmann MIME-Version: 1.0 References: <1415723092-4088-1-git-send-email-rth@twiddle.net> <1415723092-4088-6-git-send-email-rth@twiddle.net> In-Reply-To: <1415723092-4088-6-git-send-email-rth@twiddle.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2.3 5/8] tcg: Put opcodes in a linked list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , qemu-devel@nongnu.org Cc: aurelien@aurel32.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