From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X74sg-0001TD-8H for qemu-devel@nongnu.org; Tue, 15 Jul 2014 11:43:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X74sX-0000kX-92 for qemu-devel@nongnu.org; Tue, 15 Jul 2014 11:43:02 -0400 Received: from mail-ie0-x231.google.com ([2607:f8b0:4001:c03::231]:56466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X74sX-0000k9-47 for qemu-devel@nongnu.org; Tue, 15 Jul 2014 11:42:53 -0400 Received: by mail-ie0-f177.google.com with SMTP id at20so4485157iec.8 for ; Tue, 15 Jul 2014 08:42:52 -0700 (PDT) Sender: Richard Henderson Message-ID: <53C54BF8.9050907@twiddle.net> Date: Tue, 15 Jul 2014 08:42:48 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1405359671-25985-1-git-send-email-kbastian@mail.uni-paderborn.de> <1405359671-25985-7-git-send-email-kbastian@mail.uni-paderborn.de> <53C4461F.2070005@twiddle.net> <53C52A5A.9090005@mail.uni-paderborn.de> In-Reply-To: <53C52A5A.9090005@mail.uni-paderborn.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 06/15] target-tricore: Add instructions of SRC opcode format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bastian Koppelmann , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org On 07/15/2014 06:19 AM, Bastian Koppelmann wrote: > >>> + tcg_gen_addi_tl(cpu_gpr_d[r1], cpu_gpr_d[r1], const4); >> Are you planning to come back to implement V and AV bits later? > Would you recommend implementing this as a helper? It seems rather complex. > Especially with half-word and byte arithmetic. On the other hand the > instructions using this are common and would benefit from open-coding it in TCG. The halfword and byte insns probably require a helper. It's certainly going to be worth while open coding the full word operations. Ideally we'd be able to use vector instructions on the host, but we'd need serious enhancements to TCG in order to implement that. When the implementation of an insn requires more than, say, a dozen insns, or requires any branching at all, then I believe we're better off sharing the code with a helper. This is because the real compiler is significantly better than TCG at generating code across basic blocks, and the reduction in icache usage. r~