From patchwork Tue Sep 6 03:42:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 9315715 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 30D9560752 for ; Tue, 6 Sep 2016 05:50:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33B0528A08 for ; Tue, 6 Sep 2016 05:50:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26C6C28B5F; Tue, 6 Sep 2016 05:50:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id A8AFC28A08 for ; Tue, 6 Sep 2016 05:50:17 +0000 (UTC) Received: from localhost ([::1]:58894 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bh9Gy-0005Yz-Pt for patchwork-qemu-devel@patchwork.kernel.org; Tue, 06 Sep 2016 01:50:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bh7GG-00032X-Cj for qemu-devel@nongnu.org; Mon, 05 Sep 2016 23:41:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bh7GC-0007pw-6v for qemu-devel@nongnu.org; Mon, 05 Sep 2016 23:41:24 -0400 Received: from ozlabs.org ([103.22.144.67]:54677) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bh7GB-0007ki-S5; Mon, 05 Sep 2016 23:41:20 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3sSsp71knzz9t1d; Tue, 6 Sep 2016 13:41:19 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1473133279; bh=q2gdceBZQlK0vrtra8vTbxAgG6ACYLzdRw+r8FD4P/Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XCaHP4prAZlC0olU/pUCEkuAA1SlAf4Ful0zapgOP0VDjJJ7nSxI6nX4CXgIxfODB AvooWcuj/RokU2PH0NgiKJWHCRsAtv5GhAD5i9keBMOjJFh2RhDKseagDc+jtzkKLm 51olZ5rUxIWUY0XBxHNFkkfgVvdgGtF4q/vDPXpk= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 6 Sep 2016 13:42:54 +1000 Message-Id: <1473133396-18940-45-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473133396-18940-1-git-send-email-david@gibson.dropbear.id.au> References: <1473133396-18940-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 44/66] ppc: load/store multiple and string insns don't do LE 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: David Gibson , qemu-ppc@nongnu.org, agraf@suse.de, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Benjamin Herrenschmidt Just generate an alignment interrupt Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David Gibson --- target-ppc/translate.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 1315656..379d3d4 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -2889,6 +2889,11 @@ static void gen_lmw(DisasContext *ctx) { TCGv t0; TCGv_i32 t1; + + if (ctx->le_mode) { + gen_align_no_le(ctx); + return; + } gen_set_access_type(ctx, ACCESS_INT); t0 = tcg_temp_new(); t1 = tcg_const_i32(rD(ctx->opcode)); @@ -2903,6 +2908,11 @@ static void gen_stmw(DisasContext *ctx) { TCGv t0; TCGv_i32 t1; + + if (ctx->le_mode) { + gen_align_no_le(ctx); + return; + } gen_set_access_type(ctx, ACCESS_INT); t0 = tcg_temp_new(); t1 = tcg_const_i32(rS(ctx->opcode)); @@ -2929,6 +2939,10 @@ static void gen_lswi(DisasContext *ctx) int ra = rA(ctx->opcode); int nr; + if (ctx->le_mode) { + gen_align_no_le(ctx); + return; + } if (nb == 0) nb = 32; nr = (nb + 3) / 4; @@ -2952,6 +2966,11 @@ static void gen_lswx(DisasContext *ctx) { TCGv t0; TCGv_i32 t1, t2, t3; + + if (ctx->le_mode) { + gen_align_no_le(ctx); + return; + } gen_set_access_type(ctx, ACCESS_INT); t0 = tcg_temp_new(); gen_addr_reg_index(ctx, t0); @@ -2971,6 +2990,11 @@ static void gen_stswi(DisasContext *ctx) TCGv t0; TCGv_i32 t1, t2; int nb = NB(ctx->opcode); + + if (ctx->le_mode) { + gen_align_no_le(ctx); + return; + } gen_set_access_type(ctx, ACCESS_INT); t0 = tcg_temp_new(); gen_addr_register(ctx, t0); @@ -2989,6 +3013,11 @@ static void gen_stswx(DisasContext *ctx) { TCGv t0; TCGv_i32 t1, t2; + + if (ctx->le_mode) { + gen_align_no_le(ctx); + return; + } gen_set_access_type(ctx, ACCESS_INT); t0 = tcg_temp_new(); gen_addr_reg_index(ctx, t0);