From patchwork Tue Jun 26 16:19:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 140018 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5447370lji; Tue, 26 Jun 2018 09:24:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe6/mz4P/KBaCUmFbOSixBifHdXXJYAfUN//m/Rd0Q+hNrzsKVOU1duJ5CojregRMvog7eM X-Received: by 2002:a37:3a45:: with SMTP id h66-v6mr2011883qka.118.1530030299032; Tue, 26 Jun 2018 09:24:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530030299; cv=none; d=google.com; s=arc-20160816; b=Y8GqDGguV33frj2W90v1QtjIr7K3JMZ9beWiReOkTPI37TBBJdDibzNnH8FG/ZXKAa 4XXd9ZJY/AixooG6Mc9uHgU2ZFWnkiBfzmGyso/Ol8Y5SoGLYw8xxB/kvxaLGL7q93qB 7KFoEwkPkd9s5GtmvO1zmTKh319UMqqLyZGlz//uHjzTdGTiC7auQ3ejSbobzNiidYOy aF/GMjvouEZWA7/O+SLtjsCfKDDpLIqTFkVW4TH2r8syAxDPNshibWg6D8VHzPYQ9mBP 8gFz5oOoRqLupOC0b4iyKxnhg7GWOj8gOgJWHW2LH/pbVOa+34ytnMwaBs+i/E1NCKrA mn5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=ar/LuwcbZ8J5O5K8SZ1WoMJNo3wCEOiOdReZe1rWBa4=; b=Q4Vb6DJBccoEi/943L+vNhimuseKFpYvU4JqrnxUXG8+liIKrdgbGrhewgUSWDfL4M IfpFP+GHHlZ497wYSkJEU/brZa+szXcQTxFvEtV8kD118YCXORkT9OSjrgumvKBu0L9A jQYtXW8FQZ8xjpJaAUUcG/JX9rkMvAmkmNjmnfTiCpjKwzUN/GdLHzghY5+Yanm1vnQg o2BjEjrd5r3Il2RjA2kbGGmN9K+xN8fIltgGd6lahOFutrGcoXnTD/Tb20wVPqXXWeaq 2HKqb2Cmx4P2SwZH5b9blqwtSfA48xj0kPoq/QGCqW4iJ7mtQcMObs0UfgX0cQz0OzdS BBuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EbxOK6oj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id a185-v6si646301qkf.340.2018.06.26.09.24.58 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 26 Jun 2018 09:24:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EbxOK6oj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXqm2-0004mK-Dj for patch@linaro.org; Tue, 26 Jun 2018 12:24:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXqh0-00015w-FV for qemu-devel@nongnu.org; Tue, 26 Jun 2018 12:19:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXqgu-0005zH-PT for qemu-devel@nongnu.org; Tue, 26 Jun 2018 12:19:46 -0400 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]:32934) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXqgu-0005z2-KT for qemu-devel@nongnu.org; Tue, 26 Jun 2018 12:19:40 -0400 Received: by mail-pl0-x242.google.com with SMTP id 6-v6so8787362plb.0 for ; Tue, 26 Jun 2018 09:19:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ar/LuwcbZ8J5O5K8SZ1WoMJNo3wCEOiOdReZe1rWBa4=; b=EbxOK6oj3qg5ICbxR16KAYkDtA4HqtdvD22tHDOIhkEjcTx3FQLoYTv1m7hwa455LG 0DxwVJdtbXLuROJb/8SuJoQNXSImRc15ingK/iUq6Wto+KCFrMP9b+JRMgFtpbP7GPP5 Xa2jxO2YpOlj4qOKJNV6FWHouhEdEAtuOAdLU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ar/LuwcbZ8J5O5K8SZ1WoMJNo3wCEOiOdReZe1rWBa4=; b=SX668Hpyr+jLjzAznk7FDQ0s90VghsihZQu3TttsIbgORMv7VRxu/gKp8ZVEh5EPqV zKvu663ed2oC6UnDPQt5WkXfU3ufpizX5f60FCHJvagwlWa4N/UdnKq6vJGjaqgRJq56 bz0V6IhQXLjFrOgA29tKTfrguBh8G5u3ssz4xtdThVMXPtErv5mRaJit3URzWYklJalo FLa4EkIPqvFTe4vY8h/i+YR7WBU9ms/vUvIikKx7mkqm8RIFm3rnFUizOpbjP5/O4+0j u82miuAJbEiXRI8kcj0eh+T1VghklHqBrEq1VePe5QSYJjtN2Q1tt4BJ2zn5K+DVz4MI JtTg== X-Gm-Message-State: APt69E27bcNOAcxTMV0aoeyN1yAGmzVTDl7NIvuW0eFUOilFjIEIgC2W 6lr52qxAWD2I0PADBTVEfS5awm4HPn8= X-Received: by 2002:a17:902:68:: with SMTP id 95-v6mr2343350pla.178.1530029979530; Tue, 26 Jun 2018 09:19:39 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-112-211.tukw.qwest.net. [97.126.112.211]) by smtp.gmail.com with ESMTPSA id 67-v6sm5054306pfm.171.2018.06.26.09.19.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Jun 2018 09:19:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 26 Jun 2018 09:19:18 -0700 Message-Id: <20180626161921.27941-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180626161921.27941-1-richard.henderson@linaro.org> References: <20180626161921.27941-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::242 Subject: [Qemu-devel] [PATCH 10/13] target/ppc: Use MO_ALIGN for EXIWX and ECOWX 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-ppc@nongnu.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This avoids the need for gen_check_align entirely. Signed-off-by: Richard Henderson --- target/ppc/translate.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) -- 2.17.1 diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 53ca8f0114..c2a28be6d7 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -2388,23 +2388,6 @@ static inline void gen_addr_add(DisasContext *ctx, TCGv ret, TCGv arg1, } } -static inline void gen_check_align(DisasContext *ctx, TCGv EA, int mask) -{ - TCGLabel *l1 = gen_new_label(); - TCGv t0 = tcg_temp_new(); - TCGv_i32 t1, t2; - tcg_gen_andi_tl(t0, EA, mask); - tcg_gen_brcondi_tl(TCG_COND_EQ, t0, 0, l1); - t1 = tcg_const_i32(POWERPC_EXCP_ALIGN); - t2 = tcg_const_i32(ctx->opcode & 0x03FF0000); - gen_update_nip(ctx, ctx->base.pc_next - 4); - gen_helper_raise_exception_err(cpu_env, t1, t2); - tcg_temp_free_i32(t1); - tcg_temp_free_i32(t2); - gen_set_label(l1); - tcg_temp_free(t0); -} - static inline void gen_align_no_le(DisasContext *ctx) { gen_exception_err(ctx, POWERPC_EXCP_ALIGN, @@ -4706,8 +4689,8 @@ static void gen_eciwx(DisasContext *ctx) gen_set_access_type(ctx, ACCESS_EXT); t0 = tcg_temp_new(); gen_addr_reg_index(ctx, t0); - gen_check_align(ctx, t0, 0x03); - gen_qemu_ld32u(ctx, cpu_gpr[rD(ctx->opcode)], t0); + tcg_gen_qemu_ld_tl(cpu_gpr[rD(ctx->opcode)], t0, ctx->mem_idx, + DEF_MEMOP(MO_UL | MO_ALIGN)); tcg_temp_free(t0); } @@ -4719,8 +4702,8 @@ static void gen_ecowx(DisasContext *ctx) gen_set_access_type(ctx, ACCESS_EXT); t0 = tcg_temp_new(); gen_addr_reg_index(ctx, t0); - gen_check_align(ctx, t0, 0x03); - gen_qemu_st32(ctx, cpu_gpr[rD(ctx->opcode)], t0); + tcg_gen_qemu_st_tl(cpu_gpr[rD(ctx->opcode)], t0, ctx->mem_idx, + DEF_MEMOP(MO_UL | MO_ALIGN)); tcg_temp_free(t0); }