From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 107A338233DE; Thu, 1 Sep 2022 00:33:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 107A338233DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661992394; bh=0Mi8/E9hdmJZj9ZQXS9yvlL2RSl5Dwi/XUcnCGw1Hx4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WyYsNVahwDEnmBvwEcM/kqtgqU8/J2V/FBuNs/Q4GvURobRbqvEOZ8fjZWlNGSZ9u ZP+6/3TZximuZC8DuAf4bnOSw6l598SWQTVd4lmGjX4vZiU23en5w3PZjwsGLre422 KldMiBZ8B4LEzzqd9SSsZ9y6Oz9WswCu9Xo0F2Yg= From: "georgepee at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106763] Armv8.2 vmov.f16 instruction sometimes causes SIGILL Date: Thu, 01 Sep 2022 00:33:13 +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: 12.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: georgepee at gmail 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106763 --- Comment #9 from George Pee --- Thank you for following up even after I closed the ticket. Unfortunately, I'm unable to switch to a 64-bit kernel at the moment. Using this works around the issue by treating it via a neon path and enabli= ng the vfp bit and retrying the instruction. @@ -824,6 +824,9 @@ call_fpe: .align 6 .LCneon_arm_opcodes: + .word 0xee000000 @ mask + .word 0xee000000 @ opcode + .word 0xfe000000 @ mask .word 0xf2000000 @ opcode I am now using this simplified case, which fails somewhere between 100,000 = and 1,000,000 iterations: int c =3D 0; while(1) { c++; asm (=20 "vmov.f16 r6, s18\n" ); if (c % 100 =3D=3D 0) printf("%d\n",c); } It's quite odd that it is intermittent. After instrumenting vfp enable/dis= able in the kernel, it seems as though there is something disabling the vfp bit = in the fpexc register, but it doesn't seem to be the kernel. I am able to reproduce this with other FP16 instructions, but not other non-FP16 VFP instructions.=