From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUjPz-0003Rv-R8 for qemu-devel@nongnu.org; Thu, 18 Sep 2014 17:39:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUjPq-0007Bz-RO for qemu-devel@nongnu.org; Thu, 18 Sep 2014 17:39:11 -0400 Received: from mail-qc0-x230.google.com ([2607:f8b0:400d:c01::230]:46070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUjPq-00073e-M9 for qemu-devel@nongnu.org; Thu, 18 Sep 2014 17:39:02 -0400 Received: by mail-qc0-f176.google.com with SMTP id x3so2162738qcv.21 for ; Thu, 18 Sep 2014 14:38:57 -0700 (PDT) Sender: Richard Henderson Message-ID: <541B50EC.3070803@twiddle.net> Date: Thu, 18 Sep 2014 14:38:52 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1410793421-6453-1-git-send-email-pbonzini@redhat.com> <1410793421-6453-9-git-send-email-pbonzini@redhat.com> In-Reply-To: <1410793421-6453-9-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/14] ppc: introduce gen_op_mfcr/gen_op_mtcr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: tommusta@gmail.com, agraf@suse.de On 09/15/2014 08:03 AM, Paolo Bonzini wrote: > +static inline void gen_op_mfcr(TCGv_i32 dest, int first_cr, int shift) > +{ > + tcg_gen_shli_i32(dest, cpu_crf[first_cr >> 2], shift); > +} > + > +static inline void gen_op_mtcr(int first_cr, TCGv_i32 src, int shift) > +{ > + if (shift) { > + tcg_gen_shri_i32(cpu_crf[first_cr >> 2], src, shift); > + tcg_gen_andi_i32(cpu_crf[first_cr >> 2], cpu_crf[first_cr >> 2], 0x0F); > + } else { > + tcg_gen_andi_i32(cpu_crf[first_cr >> 2], src, 0x0F); > + } > +} Continuing on the name nit-picking, these *are* the mfocr and mtocr operations. r~