From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ACAD33858009; Tue, 27 Sep 2022 10:55:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ACAD33858009 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664276122; bh=j2WHctEAeQC46p2RmqNbot2zEcMrgSDGZYhzbxXL+PM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=j21tuULdrVVkVaKclCwRQ/VYCdgzEA7BWws5+mwsa7CYlsRZtIV2gmLcZ8OK82yDs Dme+arQNx+ccPY57XqLIwLeRdAIYG6KZGdyzPrVkVG2SRDRC3HUQDN5hj1EnZPqIPC ZxK1XJRmXJw0z7xeO0LZwl72M4QXpg0lLw3Kf8xg= From: "rearnsha at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107032] ARM: libgcc2.c:2174:1: error: r7 cannot be used in 'asm' here Date: Tue, 27 Sep 2022 10:55:21 +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.3.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: rearnsha at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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: cf_reconfirmed_on bug_status everconfirmed 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=3D107032 Richard Earnshaw changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-09-27 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #6 from Richard Earnshaw --- In Thumb code r7 is the frame pointer, so can't be used in inline assembler without a dance whenever the frame pointer might be needed. I'm surprised = this hasn't shown up before. We're going to need a separate definition of this macro when compiling for Thumb as you can't easily rewrite this. The code will need to do something like mov scratch, r7 mov r7, # svc 0 mov r7, scratch=