From patchwork Wed May 4 21:21:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 9018941 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 06A7EBF29F for ; Wed, 4 May 2016 21:27:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 600B5203ED for ; Wed, 4 May 2016 21:27:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AEBA7203E6 for ; Wed, 4 May 2016 21:27:07 +0000 (UTC) Received: from localhost ([::1]:50392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay4Jz-0001SF-QI for patchwork-qemu-devel@patchwork.kernel.org; Wed, 04 May 2016 17:27:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay4F1-0000Mf-AF for qemu-devel@nongnu.org; Wed, 04 May 2016 17:22:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay4Ep-0006Pg-Ld for qemu-devel@nongnu.org; Wed, 04 May 2016 17:21:49 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:53953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay4Ep-0006IV-Bk for qemu-devel@nongnu.org; Wed, 04 May 2016 17:21:43 -0400 Received: from Quad.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0MDgeU-1as0EI2UzG-00H5v6; Wed, 04 May 2016 23:21:28 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 4 May 2016 23:21:00 +0200 Message-Id: <1462396869-22424-4-git-send-email-laurent@vivier.eu> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1462396869-22424-1-git-send-email-laurent@vivier.eu> References: <1462392752-17703-1-git-send-email-laurent@vivier.eu> <1462396869-22424-1-git-send-email-laurent@vivier.eu> X-Provags-ID: V03:K0:WcXXhh+LyAj3bFlrcyhei1JuDVhWxv7QZDcXklv+U879wPiedYR ywawZrvAsscbx3y9z0rkTz5y9Wv+mJIgMpLln+P6OX3PX3nSJSbu5twNLM4CEq5szEK82zl 55JLRaO9wM8Jqnxn6h5xXYN1B6swl0UB1Ko3yUGouZ0sZKRGgtB6pb8+/Piogb4jE1zW16f uKQVBb62z/DTXVlTjF7Lg== X-UI-Out-Filterresults: notjunk:1; V01:K0:NNcUOLfQ98Y=:eQkADYWHltTJVLv2VwI9GL 5Zzc8WINrqqOJqPeBB43zXS7wc9/JcT6ZINc160PCVwt6S/I/K5pA+qRsNNmyE9+Oz0INQ8rU PXAnLzdtp8KcsXorTcfxrHanur4X+VwJs6LJltVQDw1UAeBEE27TZdO5KjuNcHihVQUfXe09c MAfL2bknMSb2riCXEtBQql/HLL1Y/pAkqKcHcry4GBTV6RRowZYCCKMiPtuqSp3UVRPMJtgd9 FWHsTPn+waJc99+p32y+Gs9bjHx751Ue46TyC+IkCs4SPp2gmMK/TG8DIp+6ZJvQnA6pouctX C56JmgXVSRRtDv5pPeY8cItgALeNa6OPDn1UlU7ERVGgmsYo48BrXB5rR162NHECS+nPjtCn4 G03HbwCRouL3rMjNGk5XgdadeW1JZceaJfWgRgbg5F7WSjDAYJNQYa+u5BqfMcwsUnl4c7AT3 YxoKzEynJBSvEt+XABFnbRLl+bopbdxtvrfOjPSWmLoZzKLWvr3pOcRFImcnrC5H8U/QH02PG fUEkb8czuJNOLlZyrfFgv2/mJcK/kkMxqi79bRtJxRhZGY3ozH2O7AJFvrBh9xwang7mwwCyS Al7QVjJP2FXDKfmIRakHTixvvQCq2+pfZ7JWq24sw1WY14wlWIfqAJlVgCuVArem4e3wi1Hy4 XW8byMkV6g2nj0wwWs8L7da7L7coOdb9NmWETMFGeSIECjDQBwqqcvV8GyPiG0YXic5U= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.24 Subject: [Qemu-devel] [PATCH 43/52] target-m68k: or can manage word and byte operands X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , gerg@uclinux.org, schwab@linux-m68k.org, agraf@suse.de, rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target-m68k/translate.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/target-m68k/translate.c b/target-m68k/translate.c index cfe878a..15109ed 100644 --- a/target-m68k/translate.c +++ b/target-m68k/translate.c @@ -2572,19 +2572,21 @@ DISAS_INSN(or) TCGv dest; TCGv src; TCGv addr; + int opsize; - reg = DREG(insn, 9); + opsize = insn_opsize(insn); + reg = gen_extend(DREG(insn, 9), opsize, 0); dest = tcg_temp_new(); if (insn & 0x100) { - SRC_EA(env, src, OS_LONG, 0, &addr); + SRC_EA(env, src, opsize, 0, &addr); tcg_gen_or_i32(dest, src, reg); - DEST_EA(env, insn, OS_LONG, dest, &addr); + DEST_EA(env, insn, opsize, dest, &addr); } else { - SRC_EA(env, src, OS_LONG, 0, NULL); + SRC_EA(env, src, opsize, 0, NULL); tcg_gen_or_i32(dest, src, reg); - tcg_gen_mov_i32(reg, dest); + gen_partset_reg(opsize, DREG(insn, 9), dest); } - gen_logic_cc(s, dest, OS_LONG); + gen_logic_cc(s, dest, opsize); } DISAS_INSN(suba)