From patchwork Tue Jun 6 09:48:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 689712 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp2540546wru; Tue, 6 Jun 2023 02:51:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43pdFId2OAIRolpgnvIWjd1Mxv2hxZdlufXNxMjbCgpzFsaC2M+eAD7Dzt+IjvaDKdj1is X-Received: by 2002:ac8:58d6:0:b0:3f8:1fc6:7ed3 with SMTP id u22-20020ac858d6000000b003f81fc67ed3mr11028995qta.20.1686045079306; Tue, 06 Jun 2023 02:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686045079; cv=none; d=google.com; s=arc-20160816; b=rOkol9uqRuUWDL8XrBamf+aoYEl3b3k3k8hfk9PGnE1YicoUR3eftBDD88tvp6dnCn tSia2s888E36fzxnsTEEJvcPX6BClb5Y5x6IQBAqUW/WQkxXLZW1WW5fXWILy0k99+oC YPzxPMXWC/Y7sl3Tt9sYt8KSE8nZXAMi7D9YAu+cuL5q8zkF+VKTtjeOCG6yBsZoNmdR Z2w3mmw92vEMgZyaCQpRwj/8tnQxP43Oipm9wc98K0LTlsFI8qVxKHHHjsxtPCgepUTG 6MK14vPAppVsnD/yQ5MTrr4LqgJVu+wvW8af22LbAv6NBxmLS2DEZ30fRm2p6FUPUO9o ULgg== 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:to:from :dkim-signature; bh=KPPDeDn6HmhkRHJXZx9s3atuThp+qwK1U/xfMKKSLsc=; b=KD9jpHWOOyLvi5nsI/+S9Dx2qelHdL5/Qu1CBt/AICLIG7BWga6DLLnWpZg8meqwHd DR2IirE7T9iHXtjrz7Etu5SGVqUdnCxdKaOdl1F/miQzzISD8BXdsSevpEobc5bcdDNP V5Eixd3L0du8wsfbSO1wDV/EaIhkWRA8fXs5DovU1eBqe/8erJolCjKNfpW3tNw0yMIc Wj6s7SNXxcH5FoktgwIStlOOfRShLx143A1mAAyjLSzJwjpB1fL4VM/dOvt00xqm2Yk1 H3cPTo+tYnqeSFjHucLkVQQRouzxevw3cdtbgTz3oeg3eBB/kO7gDIQgWScV6IK8coO6 4bUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l8R6o9Cf; 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 p15-20020a05622a13cf00b003f511726e3csi5994337qtk.629.2023.06.06.02.51.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Jun 2023 02:51:19 -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=l8R6o9Cf; 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 1q6TIz-0007px-0E; Tue, 06 Jun 2023 05:48:45 -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 1q6TIs-0007me-By for qemu-devel@nongnu.org; Tue, 06 Jun 2023 05:48:38 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q6TIp-0004lo-2n for qemu-devel@nongnu.org; Tue, 06 Jun 2023 05:48:38 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-30ae5f2ac94so5882739f8f.1 for ; Tue, 06 Jun 2023 02:48:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686044914; x=1688636914; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=KPPDeDn6HmhkRHJXZx9s3atuThp+qwK1U/xfMKKSLsc=; b=l8R6o9Cf8vkeBZc6YQZVcW6OtYk+1LuB5bcKvbP9qytwlQTD0/utOc68AQTQIblxbc wrHdOPWiQf2YlvVB6fotTo93dJvtKFR2SnG3TCRLZ5WwkL14kYkACKf745QBLBwPs8/Y Czjm865grwqsbSVO3BqNVd91s8WhVxKo8CndCh6enyzSSYbiw5HGDuy1O689b8VQ1Rc3 hzdgKkbm62eto9SiUmsZnaRAPrXMfIC6wdbVpy+icatY+OJ3nd8jc4bo3VScXSZA/EP8 rKrtiwL9Ad5xvwoxl2uM5kj1VX+6wzfBybPVJws4+Tap2H5aRdHolCoAUMefHoaTwGRf t5Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686044914; x=1688636914; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KPPDeDn6HmhkRHJXZx9s3atuThp+qwK1U/xfMKKSLsc=; b=bTmCMDZuX2FhV6W/EUHWNAxg5HA1qb1g+0Y4AOSQRMoVKPKgku9Rd1xL1ahbRorSv9 tUVUdS6LB1a4SDdhTR14lHSYkXJMjPaP3rqLxKHWRr++59LVKLV6V2mu1+qDuQdOjqSW jZqK8j70VI+7MPkH7ADnZBw6wJ08Wa77Jpxv8mFmaM09rotd7f1gh97opIhZ5SwY4IE1 hyba9JdK5uYM9j4lS2gRYAVV2oZbLZpxxleRd0zu/iyX6WaDGSaLY2xJYpYN3hi+Dm3f DYUbbkOGKJ2y9t8fAx8t8JbuB+DQoXPCpwZh/neIrTjHos6PENKuK7dINKGeHS9qwqVr F6rA== X-Gm-Message-State: AC+VfDz+uLo9rHCfom3el3lkA3169w7Hx6Afea5nZ13oryCzKgK/9LLY kFZqA+pCorxASsEsyptMZp9r6wWv46XB07KffUw= X-Received: by 2002:adf:e652:0:b0:309:3a60:d791 with SMTP id b18-20020adfe652000000b003093a60d791mr1600121wrn.54.1686044914414; Tue, 06 Jun 2023 02:48:34 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id v10-20020a5d4b0a000000b0030789698eebsm12134017wrq.89.2023.06.06.02.48.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 02:48:34 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 38/42] tests/tcg/multiarch: Adjust sigbus.c Date: Tue, 6 Jun 2023 10:48:10 +0100 Message-Id: <20230606094814.3581397-39-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230606094814.3581397-1-peter.maydell@linaro.org> References: <20230606094814.3581397-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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=ham 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 From: Richard Henderson 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 Message-id: 20230530191438.411344-20-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- 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 8134c5fd568..f47c7390e76 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; }