From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25748 invoked by alias); 14 Feb 2013 01:56:03 -0000 Received: (qmail 25681 invoked by uid 48); 14 Feb 2013 01:55:40 -0000 From: "hpa at zytor dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/56314] New: Please allow per-function specification of register conventions Date: Thu, 14 Feb 2013 01:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: hpa at zytor dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-02/txt/msg01378.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56314 Bug #: 56314 Summary: Please allow per-function specification of register conventions Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: other AssignedTo: unassigned@gcc.gnu.org ReportedBy: hpa@zytor.com gcc allows register specifications (saved, clobbered, reserved) to be changed on a per-file basis. However, for optimization uses it would be much more useful if they could be defined on a per-function basis using attributes, just as calling conventions can be specified with attributes. In the Linux kernel world we currently have several uses of functions with ad hoc calling conventions. We have to wrap them in assembly wrappers, and either write them in assembly or put them in separate files with the calling convention specified with compiler options.