From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XllEm-0001YN-90 for qemu-devel@nongnu.org; Tue, 04 Nov 2014 16:02:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XllEg-0003zK-3s for qemu-devel@nongnu.org; Tue, 04 Nov 2014 16:02:00 -0500 Received: from mail.uni-paderborn.de ([131.234.142.9]:34798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XllEf-0003z7-Tz for qemu-devel@nongnu.org; Tue, 04 Nov 2014 16:01:54 -0500 Message-ID: <54594CE5.30505@mail.uni-paderborn.de> Date: Tue, 04 Nov 2014 22:02:13 +0000 From: Bastian Koppelmann MIME-Version: 1.0 References: <1415132365-16759-1-git-send-email-agraf@suse.de> In-Reply-To: <1415132365-16759-1-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] s390x: Implement SAM{24,31,64} List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , rth@twiddle.net Cc: qemu-devel@nongnu.org On 11/04/2014 08:19 PM, Alexander Graf wrote: > +static ExitStatus op_sam(DisasContext *s, DisasOps *o) > +{ > + int sam = s->insn->data; > + TCGv_i64 tsam = tcg_const_i64(sam); > + > + /* Overwrite PSW_MASK_64 and PSW_MASK_32 */ > + tcg_gen_deposit_i64(psw_mask, psw_mask, tsam, 31, 2); > + > + tcg_temp_free_i64(tsam); > + return EXIT_PC_STALE; > +} > + You forgot to zero out bits 64-103 of psw, in case of sam24 and bits 64-96 in case of sam31. Also you forgot to add 2 (the instruction length) to bits 64-127 of psw or if this is a target of EXECUTE/EXECUTE RELATIVE LONG add 4/6. > static ExitStatus op_sar(DisasContext *s, DisasOps *o) > { > int r1 = get_field(s->fields, r1);