From patchwork Thu Feb 16 03:08:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 654005 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp123722wrr; Wed, 15 Feb 2023 19:11:37 -0800 (PST) X-Google-Smtp-Source: AK7set+9UN0I6noDeFmz9piT11uzuZPAoJJPracXZgPArLMmb2KQ4oN1MAA7stYXSBpws9mJQTh1 X-Received: by 2002:a05:6214:27c7:b0:56b:ed8f:5df with SMTP id ge7-20020a05621427c700b0056bed8f05dfmr7026276qvb.30.1676517097379; Wed, 15 Feb 2023 19:11:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676517097; cv=none; d=google.com; s=arc-20160816; b=mHnfmxQlZZa62m4ngw5Xovho69/rGNTfPkHnIC6c/5ZVqrOja96hqIM/QBkAu/ca8n JPMtpw9UaXt0ItTsfnZYkbpkiGLsiNasZl4/FSKk80fWkngRgMtOh18gnVZ265kg6Mby emZtOB0fEFFrQcMdx4z81z+gPMS2/zvC7EpbiNruNXknoWGaTEHg2irYztCc0IE8q0/L mLXubiNNiBi3pMMjnDbNOH7tVa/W7GIB0PIFjZNe32YNWz5wqe8jDL9AWRqky2U9uYGN xdHc43byKaBsVf6GaVfGY8A7laPgR7b6yUMN5W5La6TFk+AwRMUhqsWeY4TTO+ijBxFM rg/g== 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=0MajgK0PLGz4vagnIHWmbxLdve4d+jZ1hP+nPlzQtEs=; b=TEHUU+SSQileUl/WBP6DLPkrzc69/RvAZw3rT8OBiS9vZwEy0+mAze1hJ/l0qNDhz2 M6b2DdXJOl5KTrltCwZk/oDPRNGW2NbAMjHvCsVnusk58oLqT9gTLUFIix3djRfCEPmW XYtGlX3cnj21Px7WljG325BYjDrv0gHXmdskXkwANrWX+FJ6mGer14i5J1lQOWB3a+Er NTsAgzFWaGG0zTRopKOIs77KlD8FZUKPA8rOBy0PQLBlG8J1HAX7SD84cKEi2wdD1Laa ksoqz45xcmv4Dp7jVnGGzA0c+m8OHp/BxFutnUMEaw7+iRn2WL8MMesV6dzYGT2O8u5+ 2HKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ET5y+7oS; 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 l26-20020a37f91a000000b006c81aa7656bsi394708qkj.128.2023.02.15.19.11.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Feb 2023 19:11:37 -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=ET5y+7oS; 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 1pSUeI-0007WP-NS; Wed, 15 Feb 2023 22:09:30 -0500 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 1pSUeE-0007VQ-Vq for qemu-devel@nongnu.org; Wed, 15 Feb 2023 22:09:27 -0500 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSUeD-0008WD-92 for qemu-devel@nongnu.org; Wed, 15 Feb 2023 22:09:26 -0500 Received: by mail-pf1-x42f.google.com with SMTP id r17so588120pff.9 for ; Wed, 15 Feb 2023 19:09:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=0MajgK0PLGz4vagnIHWmbxLdve4d+jZ1hP+nPlzQtEs=; b=ET5y+7oSOgKMsIvGXcy5ePPXva6bPq3m2wSLziv7LSfFCvO1agjLE79mpRrogHxOCD jxAWLNTXZx6O6u5n/cbF5tmz7EBtwu4J8oI4lwAuR3AWrdjgp3yCJv9vlQN5a7pQDH06 7sr9DebKwuN8WbhDEi0lbvfnUKSYtx0haotMmoZbFLsuLa0Auwv0ejXFd6MR2bhdSLO5 lgaUw1ekXPYKV4RFBhgusoRy2yk/1nS4RaLzWI2BIhTuNu1hOSbI7naZ4NN0DePlZlnq Ltzty+pn2QCJxLWt/n0s+zGcQyLhRMGruhRBp1kQ9RRM+VVShbgaU2F2X5ZkI21JnV9/ 7LTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=0MajgK0PLGz4vagnIHWmbxLdve4d+jZ1hP+nPlzQtEs=; b=oFAT0QQhPiLDQFyl6nIpuYFKuwTXTCfB91dRb/uKaoNZqnH6NVhHDIExBtR1i2RWBg pR33Z2QA4h9vl3p8eOclLY78MYhliCm4x1DJluoB2KU9jqxqWELsfVBR7dUkYvO8PntH H8bna1QVA9enWMPWh4mjRvCHZvItNAUcvSXOUTJf9ZtKpjpe+1u4qzBSSIkhyw8v0cvD je9MoTHQCnwgErZR4OXV8OKrFlJsnxUhG9sPCAzJHOJE6Zsi8qzVjazTZcLDxb7gXFl0 w05Exp3BvUquR+mAlTb1uMkn4qbnK3CYZaWozbhTdLYa8ZVHfwH9PX6cMt1niFM1QFnm 5f1Q== X-Gm-Message-State: AO0yUKXnnMPX/0D21ut/+xnoVw48t5U/ryAKE0q4YfHBHW7Pj5DT0ntg Igfj9ildAzgYa6w3cfAh2LRYZvRfN2PSea68Gz0= X-Received: by 2002:aa7:9626:0:b0:5a8:c444:d3e5 with SMTP id r6-20020aa79626000000b005a8c444d3e5mr3639432pfg.4.1676516964414; Wed, 15 Feb 2023 19:09:24 -0800 (PST) Received: from stoup.. (rrcs-74-87-59-234.west.biz.rr.com. [74.87.59.234]) by smtp.gmail.com with ESMTPSA id i25-20020aa79099000000b005810a54fdefsm79051pfa.114.2023.02.15.19.09.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 19:09:23 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH v1 18/19] test/tcg/multiarch: Adjust sigbus.c Date: Wed, 15 Feb 2023 17:08:53 -1000 Message-Id: <20230216030854.1212208-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230216030854.1212208-1-richard.henderson@linaro.org> References: <20230216030854.1212208-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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.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. Signed-off-by: Richard Henderson Reviewed-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 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; }