From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WulZ9-0002dS-BT for qemu-devel@nongnu.org; Wed, 11 Jun 2014 12:40:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WulZ0-0006ZZ-BP for qemu-devel@nongnu.org; Wed, 11 Jun 2014 12:39:59 -0400 Received: from mail-qa0-x231.google.com ([2607:f8b0:400d:c00::231]:52952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WulZ0-0006ZE-7b for qemu-devel@nongnu.org; Wed, 11 Jun 2014 12:39:50 -0400 Received: by mail-qa0-f49.google.com with SMTP id w8so4505877qac.22 for ; Wed, 11 Jun 2014 09:39:49 -0700 (PDT) Sender: Richard Henderson Message-ID: <53988650.30605@twiddle.net> Date: Wed, 11 Jun 2014 09:39:44 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1402499992-64851-1-git-send-email-leon.alrae@imgtec.com> <1402499992-64851-13-git-send-email-leon.alrae@imgtec.com> In-Reply-To: <1402499992-64851-13-git-send-email-leon.alrae@imgtec.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 12/22] target-mips: add ALIGN, DALIGN, BITSWAP and DBITSWAP instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leon Alrae , qemu-devel@nongnu.org Cc: yongbok.kim@imgtec.com, cristian.cuna@imgtec.com, aurelien@aurel32.net On 06/11/2014 08:19 AM, Leon Alrae wrote: > * add missing zero register case What missing zero register case? > + if (rd == 0) { > + /* Treat as NOP. */ > + break; > + } This is normally handled by gen_store_gpr... > + if (rt == 0) { > + tcg_gen_movi_tl(cpu_gpr[rd], 0); > + } else { > + gen_helper_dbitswap(cpu_gpr[rd], cpu_gpr[rt]); > + } > + break; ... and this is normally handed by gen_load_gpr. Open-coding these tests just clutters the code, making it harder to read. C.f. the 1500 lines removed during a cleanup of target-alpha for exactly this sort of thing. r~