Received: from eggs.gnu.org ([2001:4830:134:3::10]:33930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wrui1-0003C1-TU for qemu-devel@nongnu.org; Tue, 03 Jun 2014 15:49:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wruhz-00049l-T3 for qemu-devel@nongnu.org; Tue, 03 Jun 2014 15:49:21 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:101::1]:49444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wruhz-000473-Md for qemu-devel@nongnu.org; Tue, 03 Jun 2014 15:49:19 -0400 Date: Tue, 3 Jun 2014 21:49:17 +0200 From: Aurelien Jarno Message-ID: <20140603194917.GJ31997@hall.aurel32.net> References: <1401461279-59617-1-git-send-email-leon.alrae@imgtec.com> <1401461279-59617-14-git-send-email-leon.alrae@imgtec.com> <20140602191612.GA4278@ohm.rr44.fr> <538D9589.1080609@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <538D9589.1080609@imgtec.com> Sender: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 13/21] target-mips: add Compact Branches List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leon Alrae Cc: yongbok.kim@imgtec.com, cristian.cuna@imgtec.com, qemu-devel@nongnu.org On Tue, Jun 03, 2014 at 10:29:45AM +0100, Leon Alrae wrote: > On 02/06/14 20:16, Aurelien Jarno wrote: > >> - case OPC_DADDI: > >> + case OPC_DADDI: /* OPC_BNVC, OPC_BNEZALC, OPC_BNEC */ > >> + if (ctx->insn_flags & ISA_MIPS32R6) { > >> + /* OPC_BNVC, OPC_BNEZALC, OPC_BNEC */ > >> + gen_compute_compact_branch(ctx, op, rs, rt, imm << 2); > >> + } else { > >> + /* OPC_DADDI */ > >> + check_insn(ctx, ISA_MIPS3); > >> + check_mips_64(ctx); > >> + gen_arith_imm(ctx, op, rt, rs, imm); > >> + } > >> + break; > >> case OPC_DADDIU: > >> check_insn(ctx, ISA_MIPS3); > >> check_mips_64(ctx); > >> gen_arith_imm(ctx, op, rt, rs, imm); > >> break; > >> +#else > >> + case OPC_BNVC: /* OPC_BNEZALC, OPC_BNEC */ > >> + if (ctx->insn_flags & ISA_MIPS32R6) { > >> + gen_compute_compact_branch(ctx, op, rs, rt, imm << 2); > >> + } else { > >> + MIPS_INVAL("major opcode"); > >> + generate_exception(ctx, EXCP_RI); > >> + } > >> + break; > > > > Why is that introduced only in the MIPS32 case, but not in the MIPS64 > > case. > Do you mean BNVC, BNEZALC and BNEC instructions? They are introduced in > MIPS64 as well, you'll find them in OPC_DADDI case. OPC_DADDI was > removed in R6 and its encoding has been reused for those instructions. Oh correct, I missed that part. It might be a good idea to add a small comment about that after the #else. > There's quite a number of good findings. Thanks for the comments and > suggestions. I will continue to review the remaining patches as time permit, probably tomorrow. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net