From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 307713858C31; Sat, 24 Jun 2023 10:04:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 307713858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687601071; bh=kJgR4kci6xQ7d0E0S+6x3Cn8l5DKC7KT6WjXreQm4DA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mQ5wKUClpQM+7A4bfAyRsqGA6pVNI851aRlGf4JfBarM2uW+x2TmtSUtSCOhIHgVc Qo3mb4/U2LFl4CIC8ieT4ykVeS1SBxG6o8xUJleytBoU4dwXup8u/LPVif6BfQJ52T QgrAKZaDt7bn7aAc/M289rbULvX30w5Li4JBKR5E= From: "xry111 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109456] `-ffixed-reg` cannot prevent using `reg` for ABI-mandated roles (argument register etc) and the behavior should be documented more clearly Date: Sat, 24 Jun 2023 10:04:30 +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: documentation X-Bugzilla-Severity: normal X-Bugzilla-Who: xry111 at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: 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=3D109456 --- Comment #14 from Xi Ruoyao --- (In reply to Andreas Schwab from comment #10) > Or "other ABI-mandated fixed roles". This also includes return value > registers. Hmm, even "ABI-mandated fixed roles" is not enough. For example, or RISC-V= we have extern int foo(char *); int test() { char x[12345678]; return foo(x); } Then t0 is used by the function prologue, and -ffixed-t0 cannot stop it (because the use of t0 is hard coded in the target hook).=