From patchwork Wed Nov 25 04:06:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 332355 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp122391ilb; Tue, 24 Nov 2020 20:08:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLTNBH4WdyApJ5BPep5xF6pw4vVe2TCPyxjdEM1amwvvAYBMiPdrU7x+IYz9y/t3yCQM9k X-Received: by 2002:a25:b985:: with SMTP id r5mr2197323ybg.270.1606277319883; Tue, 24 Nov 2020 20:08:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606277319; cv=none; d=google.com; s=arc-20160816; b=yWHhFp11HU7qMMx1oMQ0KtA18XmhizEd/ML5gz0FmReG/wS+bE56cSbt8f4lDRnTkv dJfwd8arXXwdILhmgPw7oT9QvrV5Kxf1lEzq/fiEUCc1CMrLigejEZXpoczzkXXhW3Yl wUBtdC+yhMjk7vIl2zHupptWaoWS8tU23COjjp+tVlbtxfvat8GifsH2mgV4/IgMrNKr r6hs9boyvyiYGFG/tD/C16aZSMWelVh6GrlRb6oPoUUnwFn72ihHQimATXMIKMUujyZP ttbo0pmbWwpuiULfOtaKH3lNsk+NvxKeIAI3NCWgCVBCuIEP/P79q+SZ6GsBlcU8csO0 msZA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=wlXlRdc0Ps4lTbxrXVpBLYGv+DVDYQ5KsE5wMhxDQbM=; b=1KMWMi7MkE+7gOHb0/khjZ06KNUXOFbzDZ5hBdl4OKcb3dZ5g8JJgmhAactvqe2dzp MeL8wP4VLYZ6WkZgq2q9cXYuFRrt9vs/5ZRccgbHgITec3HzDLQKFsBIB/EqQJa/FxxO WiT7SCQoAJnYCgVI+Ecu8OkS2IYMDFmbKyoll5PcyoW8b1+jNwWcoL7SvF1CMREidir0 xQ+FoVcxIfBA65zBGOUI98eXlqxJHWSG05Mby/XXmaA4oI9hRUwf3rwHFmGxKszArljR prtZchkRbkib2MpbEkpiWLn1PGajF8a2p9n5UHhd+j5z+IVbpvS/ldlLztLpDd7nM2dh 35Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NNRKuJv7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k15si936263ybk.265.2020.11.24.20.08.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Nov 2020 20:08:39 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NNRKuJv7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khm6h-0006tT-Bo for patch@linaro.org; Tue, 24 Nov 2020 23:08:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khm53-0004wX-6n for qemu-devel@nongnu.org; Tue, 24 Nov 2020 23:06:57 -0500 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:42820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khm51-00064B-G1 for qemu-devel@nongnu.org; Tue, 24 Nov 2020 23:06:56 -0500 Received: by mail-pf1-x443.google.com with SMTP id 131so1082279pfb.9 for ; Tue, 24 Nov 2020 20:06:55 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=wlXlRdc0Ps4lTbxrXVpBLYGv+DVDYQ5KsE5wMhxDQbM=; b=NNRKuJv7HLZcC5szZ1uyUbuBzCZmY4Q1NklB4u8+mYUaKrlbadAHYSZZY55YHXdFfk irt4OI52mFuRR6gEjsxlOPG9GozlmHhGIKSM4OavI29Y38fdPGkJ+3drRIeE0QZYoojp DvEAwrfG8FK13p68DDvikQklLZA3/G6aOoGQqfopLEAU/nkHHezgC7sgDJBVR56JkAFA CmmQjGohxTsuYD0agAjAL2f36vDLctFYa3Gm4Fj8dfc7HUWGAaYhD1sPMblpVQIPrEdi uGg49K3wb7s3uD6Dua3QsAvd456Dp+aCTiuCARZ64P6pe8SpE/H3pPIEJsTsIEZA0ZXW kmRw== 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:mime-version:content-transfer-encoding; bh=wlXlRdc0Ps4lTbxrXVpBLYGv+DVDYQ5KsE5wMhxDQbM=; b=gksaH4st4zLjgT+dX6ydMrHowJzeK02EC3cpWlvRau1lHkj6dlXQjLF/oM5ub1+avE +SEBs7Hbo4DoZZeuoUAMk7tlnKwT/fYHp13phpS3YRy9jngz9nlNoVKeSq9dJMj9f6zC c0VhA4e3OX6p//zQZMAtOEpIwIkpr+kGAGQ8itXA3eUerXR7taGkYZ8Atg0yc6cBpHpl OWedePdY7RrSl7rZyn51RhWgyqfxavHTvlIPMh0RBRyyKWtQHW1AJd6oO0L2cRJEsrGn Qd1j55BrsNaHaMEBC9cud42TaSZy4fEmuuMW11aQsW+kQRtuAuST0ZBNv5ggJzF8tTuv 08kw== X-Gm-Message-State: AOAM532eIr953A47qpOxxYxQTcSgG0udHw2xBD04Li6E4r7UQanarTPO KhpvajpRcp2kt+eXLRq4lXQP9N5roniNhA== X-Received: by 2002:a17:90b:4b0a:: with SMTP id lx10mr1838625pjb.128.1606277213961; Tue, 24 Nov 2020 20:06:53 -0800 (PST) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id f7sm447806pfe.30.2020.11.24.20.06.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 20:06:53 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 07/11] target/arm: Enforce alignment for VLDR/VSTR Date: Tue, 24 Nov 2020 20:06:38 -0800 Message-Id: <20201125040642.2339476-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201125040642.2339476-1-richard.henderson@linaro.org> References: <20201125040642.2339476-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::443; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x443.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/translate-vfp.c.inc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) -- 2.25.1 diff --git a/target/arm/translate-vfp.c.inc b/target/arm/translate-vfp.c.inc index 58b31ecc3f..51e85c2767 100644 --- a/target/arm/translate-vfp.c.inc +++ b/target/arm/translate-vfp.c.inc @@ -926,11 +926,13 @@ static bool trans_VLDR_VSTR_hp(DisasContext *s, arg_VLDR_VSTR_sp *a) addr = add_reg_for_lit(s, a->rn, offset); tmp = tcg_temp_new_i32(); if (a->l) { - gen_aa32_ld16u(s, tmp, addr, get_mem_index(s)); + gen_aa32_ld_i32(s, tmp, addr, get_mem_index(s), + MO_UW | MO_ALIGN | s->be_data); vfp_store_reg32(tmp, a->vd); } else { vfp_load_reg32(tmp, a->vd); - gen_aa32_st16(s, tmp, addr, get_mem_index(s)); + gen_aa32_st_i32(s, tmp, addr, get_mem_index(s), + MO_UW | MO_ALIGN | s->be_data); } tcg_temp_free_i32(tmp); tcg_temp_free_i32(addr); @@ -960,11 +962,13 @@ static bool trans_VLDR_VSTR_sp(DisasContext *s, arg_VLDR_VSTR_sp *a) addr = add_reg_for_lit(s, a->rn, offset); tmp = tcg_temp_new_i32(); if (a->l) { - gen_aa32_ld32u(s, tmp, addr, get_mem_index(s)); + gen_aa32_ld_i32(s, tmp, addr, get_mem_index(s), + MO_UL | MO_ALIGN | s->be_data); vfp_store_reg32(tmp, a->vd); } else { vfp_load_reg32(tmp, a->vd); - gen_aa32_st32(s, tmp, addr, get_mem_index(s)); + gen_aa32_st_i32(s, tmp, addr, get_mem_index(s), + MO_UL | MO_ALIGN | s->be_data); } tcg_temp_free_i32(tmp); tcg_temp_free_i32(addr); @@ -1001,11 +1005,13 @@ static bool trans_VLDR_VSTR_dp(DisasContext *s, arg_VLDR_VSTR_dp *a) addr = add_reg_for_lit(s, a->rn, offset); tmp = tcg_temp_new_i64(); if (a->l) { - gen_aa32_ld64(s, tmp, addr, get_mem_index(s)); + gen_aa32_ld_i64(s, tmp, addr, get_mem_index(s), + MO_Q | MO_ALIGN_4 | s->be_data); vfp_store_reg64(tmp, a->vd); } else { vfp_load_reg64(tmp, a->vd); - gen_aa32_st64(s, tmp, addr, get_mem_index(s)); + gen_aa32_st_i64(s, tmp, addr, get_mem_index(s), + MO_Q | MO_ALIGN_4 | s->be_data); } tcg_temp_free_i64(tmp); tcg_temp_free_i32(addr);