From patchwork Thu May 25 23:25:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 685641 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp623430wrt; Thu, 25 May 2023 16:28:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ASI9a1rksrEJld+7sqSIfNGRqrtYeykUKWOGG5O2eP9NVjSOCCZIHz/uvgtSQ0N+LWlz7 X-Received: by 2002:a05:620a:468a:b0:75b:23a1:3f7 with SMTP id bq10-20020a05620a468a00b0075b23a103f7mr459263qkb.13.1685057327009; Thu, 25 May 2023 16:28:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685057326; cv=none; d=google.com; s=arc-20160816; b=wfeoQVjHav769XcLp0xEFFUkjhryO6/ZoQhAcpU6b+UiX7DdE/MX5PxOYilQDUAbI9 Mq+pnIjyHBt+eBRrzWHNKLIPXJKmWXGARdKwtHECXJwQwatHsSFNaUjOOfS/BxdiCAvr c4httLQ87yVp7DsX/F+gNhwJveTkKPkzbLpVp8ja4KrwZCLGKoqWqk2uELGkBnh4y6X9 60WafmDQuuEsOxb1SBhpdHtE8DeQkL+6W9R7nxN+RruKOCjlwt4vgzSq+38nKLZ60SqN uFERV0hnPu67I6L5O4kjRIGZ5v5eZ5LoouVuP/xjql4x8z5CEUbOxN1rIyKPnX6/Osxr fIIw== 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=vBsXVP/9XAPVIKfQuOPr6F4cwYH35zFcGFTIfd/o9COVXSkf/H9lNiMAdJ7AHIvRIL 73NGGFuKXi56995JavE7DHAqUOWfp/7919lSl8PBHKGrIQT0MIKvfAyjn7dnYuBM+Pfe OYJAfac2q4Pua7cNnAAxYWKCZLOJZcIQPfq6BGPlNIVCuKvF0TGq9++rBiYUKTJ0UzkO RwUtzsFVfUU6anJZlXPhcCQfGJSSJHXBvA1rlk/dyPlBZg2Iny1mrg6BXJuSzQBe0tOD eyc+Cti2N+oD9Ty/tzJ1FfqLHFiZ7G1bXA20MJDO1ucow+wQh10f6iu6kmkFDYq1n43Z JJ/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D95VQ1tR; 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 i11-20020ae9ee0b000000b0074a44b93927si937060qkg.272.2023.05.25.16.28.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 May 2023 16:28:46 -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=D95VQ1tR; 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 1q2KLl-000612-1P; Thu, 25 May 2023 19:26:29 -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 1q2KLe-0005v4-1I for qemu-devel@nongnu.org; Thu, 25 May 2023 19:26:24 -0400 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2KLY-0005qH-3Q for qemu-devel@nongnu.org; Thu, 25 May 2023 19:26:21 -0400 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-53474b0c494so104563a12.3 for ; Thu, 25 May 2023 16:26:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685057175; x=1687649175; 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=D95VQ1tRvJ2i3Xtl/TXHyO428ZCDEjHiiy8RNMauvE+2eLnZBxLjEPgwbOzI0AWKXd 0XlxlhGhDHyiGaEBF5z4ud6GED4fHoe0WusI1HIhYf/z8pSjugPfR3AZVqCcTLaIFo7C 16T7hOzI+/PVgW6RTirRgIjquhDbP9Wexl2tVagA5WXLFML9bE31byxjFIVBODpNPYDb XWMHjfy02fekXFX7zvaPpXVtsUxd2ujNdi2tMlC/6A52GXwDmIiY5YIgWVyucBDjeAeL EwAJRMxEc9WA8GavvLekx9S4HUO+tm1FDpx1qVx4uii2t3lOD1+PAswd71IWJrM1jIAZ OR+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685057175; x=1687649175; 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=EqgvEUpfyu89r6X82AO8kmDxUxUqiW65g5a6jqBxI49Bqx2yzjS4udIWBtUsWB2/QU MOi4LAt4/khSC63ORJJ1mK7aJmke+jphZm2SLm1640XnNQob/x8fZhxMVfF8apf38LjV cgui79lBXDnlxDCcT50ljMYF9q3zIZ0EhCq+tGLuWIk/BQQ0GRfHtIQG81grNN5Tk+c6 ZZ61IEdquz+XUJP6ZQ753XMM7dbDXAfa1tA2X1+0GeiIpZze3xbdzCrW6ADg3oP73w6r CWSC3BpDcjnmnAO5wJbKZOTyTYCy5vUwY7oK6QzU5OO4WClSnaeBEtUDK11hGzvdm/fI p5Fg== X-Gm-Message-State: AC+VfDwugwddK0qB70jxXJCV6eWjqQQHOZHNlKmbBjdPd0TKSTgXLc1v 8aoNfK0TiQhr4lYCyr1vI4HQFcky85DxqX8gCU8= X-Received: by 2002:a17:902:f686:b0:1aa:f78d:97b7 with SMTP id l6-20020a170902f68600b001aaf78d97b7mr433101plg.46.1685057174934; Thu, 25 May 2023 16:26:14 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:7ac5:31cc:3997:3a16]) by smtp.gmail.com with ESMTPSA id s15-20020a170902ea0f00b0019e60c645b1sm1885036plg.305.2023.05.25.16.26.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 16:26:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v2 19/20] tests/tcg/multiarch: Adjust sigbus.c Date: Thu, 25 May 2023 16:25:57 -0700 Message-Id: <20230525232558.1758967-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230525232558.1758967-1-richard.henderson@linaro.org> References: <20230525232558.1758967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x536.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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; }