From patchwork Wed Jul 27 06:56:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 653192 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rznVP1yrXz9t1p for ; Wed, 27 Jul 2016 18:00:44 +1000 (AEST) Received: from localhost ([::1]:44758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSJli-0004cU-N0 for incoming@patchwork.ozlabs.org; Wed, 27 Jul 2016 04:00:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSIqH-0006gb-Lg for qemu-devel@nongnu.org; Wed, 27 Jul 2016 03:01:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSIqF-0005nI-PW for qemu-devel@nongnu.org; Wed, 27 Jul 2016 03:01:21 -0400 Received: from gate.crashing.org ([63.228.1.57]:57006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSIqF-0005nC-ED; Wed, 27 Jul 2016 03:01:19 -0400 Received: from pasglop.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id u6R6wWG7001953; Wed, 27 Jul 2016 02:00:57 -0500 From: Benjamin Herrenschmidt To: qemu-ppc@nongnu.org Date: Wed, 27 Jul 2016 16:56:48 +1000 Message-Id: <1469602609-31349-30-git-send-email-benh@kernel.crashing.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1469602609-31349-1-git-send-email-benh@kernel.crashing.org> References: <1469602609-31349-1-git-send-email-benh@kernel.crashing.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 63.228.1.57 Subject: [Qemu-devel] [PATCHv2 30/31] 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: qemu-devel@nongnu.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Just generate an alignment interrupt Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 0723c97..3dd9a48 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -2888,6 +2888,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)); @@ -2902,6 +2907,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)); @@ -2928,6 +2938,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; @@ -2951,6 +2965,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); @@ -2970,6 +2989,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); @@ -2988,6 +3012,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);