From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayjI5-00054d-Uy for qemu-devel@nongnu.org; Fri, 06 May 2016 13:11:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayjHu-0001vL-DJ for qemu-devel@nongnu.org; Fri, 06 May 2016 13:11:44 -0400 Received: from mail-qg0-x233.google.com ([2607:f8b0:400d:c04::233]:36366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayjHt-0001pq-6D for qemu-devel@nongnu.org; Fri, 06 May 2016 13:11:38 -0400 Received: by mail-qg0-x233.google.com with SMTP id w36so59385348qge.3 for ; Fri, 06 May 2016 10:11:23 -0700 (PDT) Sender: Richard Henderson References: <1462392752-17703-1-git-send-email-laurent@vivier.eu> <1462392752-17703-29-git-send-email-laurent@vivier.eu> From: Richard Henderson Message-ID: <5ee59cc2-1308-4d62-5ebc-a03c83c40baf@twiddle.net> Date: Fri, 6 May 2016 07:11:11 -1000 MIME-Version: 1.0 In-Reply-To: <1462392752-17703-29-git-send-email-laurent@vivier.eu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 28/52] target-m68k: add addx/subx/negx ops List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , qemu-devel@nongnu.org Cc: gerg@uclinux.org, schwab@linux-m68k.org, agraf@suse.de On 05/04/2016 10:12 AM, Laurent Vivier wrote: > + tcg_gen_or_i32(QREG_CC_Z, QREG_CC_Z, QREG_CC_N); /* !Z is sticky */ > + gen_ext(QREG_CC_Z, QREG_CC_Z, opsize, 0); Extending Z after the OR is a bug. The (old) high bits of Z might be set from a previous word operation (i.e. !Z) which is exactly what's supposed to be sticky. Since N has already been sign-extended, we've already cleared out any garbage from the sub-word result. There's no need to do anything more here. Same change in negx, addx, subx. > + gen_store(s, opsize, addr_dest, QREG_CC_N); > +} > DISAS_INSN(mov3q) Watch the spacing. r~