From patchwork Fri Apr 16 18:59:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 422571 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp654438jaf; Fri, 16 Apr 2021 12:12:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiNwFUA/rwXlXNJLPZmInsGBJNGoOUt2+rlMM0DEjUdH49Mx61GiJH+SuN79Tty0+sQdCz X-Received: by 2002:aca:1119:: with SMTP id 25mr127907oir.124.1618600370337; Fri, 16 Apr 2021 12:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618600370; cv=none; d=google.com; s=arc-20160816; b=B1s4n8G6YrIG6vJ8Lq6jdcx5L/gLo5uwU56yTKYIkUKR/AnKQBTVJlVk+EV30eIfYz jXaso4tCnWAixBwCcL0r1j8jOWcroTYau8kAKb8eGDzXBraYJOTVeJaBOmdngRm9UgcB 4rGzR9JbzyAAYxqMx30cWn3HTpzbdRtzlMQjBQZoPPHmeMvpKrhAPkiyWkFDOLqdCSPK zuby5bSqV9fhKuy+AbedaNZOvEwDXaGVM7elcl1SIte8xzGPJp5k7td4lRzrrfKPO7qL CxhwA0iBig4Ykh2tNIXVBG0/bEVbdsHOkV8DTIHs/nUkWAXcRA307h2Yvma8cBY1AC4Z jQqQ== 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=ltuTQwf3YJkQ09A/ilMOxMZEVgxXZ+bcwwZi4bHmuUg=; b=yyFTTAHqPhWMsoB1ZLtQ34Vs+5DqMrk0ppexYYpDapgZCudU5s3JglBOnDPY4MpNw2 6K0bOSdEsRMNRIXedwrqPiJN1JjoAFufd80DLWtIDZmwRzUNTCt1RcR8YlyawjwjI1Dr AO30HHBK33jgQqgwDf+ekP0PUOgeWHXrQ9FlxtvLx/AueAIe77Pvo3ooJS75SoIJDhRC fP7t3UjKnZk/qxw0peqKkMFKhRKVOuQkVCcUOkumCgfOrh9B95WCRYtW0Wp1/yOhiWBl dxhmaOJbaFQ74BSHMLwVTNnWxMyphi/FczYsnukj1wc6I/KgtGqOwSKq4W5fdK0ub7M3 3VLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dnH5fpaj; 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=fail (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 g2si7097337oiy.145.2021.04.16.12.12.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Apr 2021 12:12:50 -0700 (PDT) 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=fail header.i=@linaro.org header.s=google header.b=dnH5fpaj; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXTtZ-0001kH-Lf for patch@linaro.org; Fri, 16 Apr 2021 15:12:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXThm-0003qU-6A for qemu-devel@nongnu.org; Fri, 16 Apr 2021 15:00:38 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:41521) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXThU-0004NR-G9 for qemu-devel@nongnu.org; Fri, 16 Apr 2021 15:00:37 -0400 Received: by mail-pg1-x52c.google.com with SMTP id f29so19813472pgm.8 for ; Fri, 16 Apr 2021 12:00:17 -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 :mime-version:content-transfer-encoding; bh=ltuTQwf3YJkQ09A/ilMOxMZEVgxXZ+bcwwZi4bHmuUg=; b=dnH5fpajtitNw3WFYD9LEBeUWDBw8hlrnvfVWArNxaQxStXftkCJLUzelaU2ufZziT t7VncRQ6Ps1wblUbqeaJnnw9oqkpCgJ3PeGqyYIo+IRp7C+xV0VMDjl0U49Arnogxl5f 9Y+WcG7gdpVGMPJL0bhJ2P4x2VOQ/VApaJBh+HyuXQBK/GCuTjFGerUBYSfLC7WTelRF ofMXhwc9Eg/twkaF3l7eYF0bL8oUTTfKk4jP9P/8tb9DO1pmTPtYpRJTiqR8mze6asbR 3QzeYi3Eg/4aiNyo2KEyQyyfJNkHt24YkFxPXxDbPANJuqpW+ymvf1j9ljAa95K5i2rm cPeg== 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=ltuTQwf3YJkQ09A/ilMOxMZEVgxXZ+bcwwZi4bHmuUg=; b=cuPJcEUM2lT5QWitclQN/yvhU5agCJ+Pz0YtUDOw2ZvP6HZKul95ay9L+1OkaDvgMf VgkXssqfAfFJw58xwFCoHFdq6Pgfq3sajckqfpROxwkeOH/b9m4gUxT0PlJfu/u5x4bo NI3OWRVVMhtseLsgwdG95qxYlanHVQ5wroBoJvOIsNx0Wntw6z6D+MiFtP9xFLyxp6qd CHG38vbCF/OcVxrg2hd7qMcSeSD7cd1xrFj/JYxb1zlag0eaTIYHPuCZDufZH8/N5AfC w5CPSEUAEgrTR9VEchbQuEeT/ES6xoNw9809aELPVhVI6K76zmm+bCWm6WlqWeZ+P9m0 AGWw== X-Gm-Message-State: AOAM533hfGe+QRlVvXYNXlvJ/wcqR9IxezsQH0m/Z9st86y89MIUfz5e kGZFBNmFhxQoU9R9JkujnVM232xVrVvKTA== X-Received: by 2002:aa7:989c:0:b029:253:a2c7:9b29 with SMTP id r28-20020aa7989c0000b0290253a2c79b29mr8994857pfl.39.1618599616406; Fri, 16 Apr 2021 12:00:16 -0700 (PDT) Received: from localhost.localdomain ([71.212.131.83]) by smtp.gmail.com with ESMTPSA id d7sm1988337pfv.197.2021.04.16.12.00.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 12:00:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 16/30] target/arm: Enforce alignment for LDM/STM Date: Fri, 16 Apr 2021 11:59:45 -0700 Message-Id: <20210416185959.1520974-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210416185959.1520974-1-richard.henderson@linaro.org> References: <20210416185959.1520974-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.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=ham 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: Peter Maydell , qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.25.1 diff --git a/target/arm/translate.c b/target/arm/translate.c index 270b10f83a..1ddfce9dfe 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -7868,7 +7868,7 @@ static bool op_stm(DisasContext *s, arg_ldst_block *a, int min_n) } else { tmp = load_reg(s, i); } - gen_aa32_st32(s, tmp, addr, mem_idx); + gen_aa32_st_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); tcg_temp_free_i32(tmp); /* No need to add after the last transfer. */ @@ -7943,7 +7943,7 @@ static bool do_ldm(DisasContext *s, arg_ldst_block *a, int min_n) } tmp = tcg_temp_new_i32(); - gen_aa32_ld32u(s, tmp, addr, mem_idx); + gen_aa32_ld_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); if (user) { tmp2 = tcg_const_i32(i); gen_helper_set_user_reg(cpu_env, tmp2, tmp);