From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0F9B73858C50; Wed, 17 Aug 2022 06:37:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F9B73858C50 From: "xgchenshy at 126 dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106635] AARCH64 STUR instruction causes bus error Date: Wed, 17 Aug 2022 06:37:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: xgchenshy at 126 dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2022 06:37:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106635 --- Comment #10 from Xiaoguang --- (In reply to Xiaoguang from comment #9) > (In reply to Andrew Pinski from comment #8) > > In ARM Armv8, for A-profile architecture (ARM DDI 0487G.b (ID072021)):= =20 > >=20 > > From section B2.5.2 Alignment of data accesses: > >=20 > > An unaligned access to any type of Device memory causes an Alignment fa= ult. > >=20 > > Unaligned accesses to Normal memory >=20 > Yeah, I also find such description, my memory type is uncachable normal > memory, but not device memory > I use mmap to get the virtual address with an O_SYNC in fd Also I didn't see whether normal memory cacheable or not impacts alignment access , besides, STUR instruction has unscaled imm offset, it should suppo= rt unaligned access on normal memory, no matter cached or not,and my X0 is nor= mal memory so I'm still confusing why it fails, please correct my if my understanding is wrong. thanks very much=