From patchwork Tue May 30 19:14:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 686922 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp899699wru; Tue, 30 May 2023 12:17:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CZ+BDTIYTB83QvMif/xggn+N+Zg9EmlIgcjtrVYpjuyQuMYNozg7VQAopzJ4uuUpPXWk5 X-Received: by 2002:a05:622a:609:b0:3f6:a741:192b with SMTP id z9-20020a05622a060900b003f6a741192bmr3239099qta.68.1685474220712; Tue, 30 May 2023 12:17:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685474220; cv=none; d=google.com; s=arc-20160816; b=w1AFH8RsYiu+hxxUAVhAM1OeJw+momJMl72JZUzerjlB8TQYTUZJlvBl+zEKQeMbFM qJ5QOWGiZ9ycxR4DOXMN3XEAMumqFfVfFDfinXa9BjAHfDziLzUAvqmjAPbtgdTKtYWf rx3ZR06GZVBPIx6KaMBdM5aeB9LLArJs7Pe5li4DxbJ7gr0rDF9y9EWmoPgOkdlKHWN3 cjHo5+5p8mgKKZw35V+YpSAvlwEUm6/S2gnZYGfHLZ4fBrS8e4lw42b30t12BmBlFSq9 XXuFPu0siVsbfF/mf/4xvg7oomWydeP0mwhsB1pHlXkHo8D7N0xSgA7VJpC1E4T9HD6I qXkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=HmTrzaAymfCp1fyYj9R9fztmY/GgYJekROiEVCv4rCU=; b=XMaGLaxaZpWRiZevcEZUhqhqMLpqJ0BTkBqQ5Mj4RJFi1w56hz0DRuXLCRPiGlqR2u RCABguH6CP7LQU6VF0X8rL17j7oEZHHWZ1DWKl/foum0n0qaX8AuRSEubVH7pQ/3YtqY XSWLrXilXs1tPdOXqkMFtC3s/mKUHnjl0p0h+RfmTUR2pLYGTZUBbuBDBcKN+7aQFIug 9hJdhTBRIEv+PANswdjFOezUipSOoK5WWnyOKEnQG/TpvWK5VCOvmRDKd0diz0pb8YG7 nh9fMIjkwZog0YKOP1FiykeuxvOOCsgdZ+yOkDOHAgyZY85+jS67OVE3lQ3jBTXX8GU6 opYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wYJNpFf/"; 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 o13-20020a05622a044d00b003ef5008336bsi6918006qtx.28.2023.05.30.12.17.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 May 2023 12:17:00 -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=pass header.i=@linaro.org header.s=google header.b="wYJNpFf/"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q44oY-0007iU-VB; Tue, 30 May 2023 15:15:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q44oM-0007fn-7q for qemu-devel@nongnu.org; Tue, 30 May 2023 15:15:14 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q44o4-0004kh-Cj for qemu-devel@nongnu.org; Tue, 30 May 2023 15:15:13 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-64d604cc0aaso3847580b3a.2 for ; Tue, 30 May 2023 12:14:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685474095; x=1688066095; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HmTrzaAymfCp1fyYj9R9fztmY/GgYJekROiEVCv4rCU=; b=wYJNpFf/g6xQBTZGHrO3bP1/F1g1sE1/U0qAsIDjkuKgyD7sBgFpxh6NO2djJoLL2z zS+L3GMUTRaTi/0MdQULRwaL7MkEwU0W26R+Q1wvKg+bCNDIzAJQkTlHlKY926P0gnI1 az0XCX1NuqkEPcWX7JfRjvx8z43JgYHp44UMbzWAGeMhSWThTzVlsOw7IU2XE3G4L6AL agkdQcPEm6rb+ICPWROP1G18F3NuAPgoO6lYQ/EGXmRvxHXLQ06fbpw4RY3RHQfdbkI6 6c2+clAsEOHGHWjqCU44awCBpJHgRH2wptq0E3wYtcFVLfJgLZy/e8FE14XRw3xReURa MGHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685474095; x=1688066095; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HmTrzaAymfCp1fyYj9R9fztmY/GgYJekROiEVCv4rCU=; b=S4gOakj8ea8Od9ViasxciaUBBrf9w+e7l/y4iEvwHYOh+dtxdnDX8aDXLxKJMCJwMP m1OsNXzc+5fIEgC7eUPTKOqUemaUgNq5ov0J/a6fqPG3f8OhL62wmwjaHfJjAFhKQbOb qFhctpanXzRV9LvtZKI1EEh02fCon378Bm5fqRuZcjVAbX0nznK1Hw6AeDSTCqa+X3sg E3dC9uK3goQinJS0gaInYmnZ4jTS9UIY5HTPu8klWgQ9Jd7QzK9A50OO/J0XEfTmuEBW TkOglPfZLT0XfV5QqGYx6eK1ztF2YEWC4NHPMDwkFG633vg8iNkuK0diQqVO3TL1cMlk cKCw== X-Gm-Message-State: AC+VfDz7ZjNsxo+c3ooY8Qrtt8eBltpLCGmC3veuA3hpM8AxnAbzE3D6 BpSDxQX1qwsAT1lvjaVJW2nEEi5/jDgLBPVARwQ= X-Received: by 2002:a05:6a00:21cc:b0:64d:41d5:d160 with SMTP id t12-20020a056a0021cc00b0064d41d5d160mr3837074pfj.20.1685474095169; Tue, 30 May 2023 12:14:55 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:35a2:c45d:7485:f488]) by smtp.gmail.com with ESMTPSA id 10-20020a63104a000000b0051806da5cd6sm8926757pgq.60.2023.05.30.12.14.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 May 2023 12:14:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v3 19/20] tests/tcg/multiarch: Adjust sigbus.c Date: Tue, 30 May 2023 12:14:37 -0700 Message-Id: <20230530191438.411344-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230530191438.411344-1-richard.henderson@linaro.org> References: <20230530191438.411344-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org With -cpu max and FEAT_LSE2, the __aarch64__ section will only raise an alignment exception when the load crosses a 16-byte boundary. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tests/tcg/multiarch/sigbus.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/tcg/multiarch/sigbus.c b/tests/tcg/multiarch/sigbus.c index 8134c5fd56..f47c7390e7 100644 --- a/tests/tcg/multiarch/sigbus.c +++ b/tests/tcg/multiarch/sigbus.c @@ -6,8 +6,13 @@ #include -unsigned long long x = 0x8877665544332211ull; -void * volatile p = (void *)&x + 1; +char x[32] __attribute__((aligned(16))) = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, +}; +void * volatile p = (void *)&x + 15; void sigbus(int sig, siginfo_t *info, void *uc) { @@ -60,9 +65,9 @@ int main() * We might as well validate the unaligned load worked. */ if (BYTE_ORDER == LITTLE_ENDIAN) { - assert(tmp == 0x55443322); + assert(tmp == 0x13121110); } else { - assert(tmp == 0x77665544); + assert(tmp == 0x10111213); } return EXIT_SUCCESS; }