From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9316 invoked by alias); 14 Feb 2013 02:24:16 -0000 Received: (qmail 6186 invoked by uid 48); 14 Feb 2013 02:23:56 -0000 From: "hpa at zytor dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/56314] Please allow per-function specification of register conventions Date: Thu, 14 Feb 2013 02:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: In-Reply-To: References: 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/msg01381.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56314 --- Comment #2 from H. Peter Anvin 2013-02-14 02:23:53 UTC --- Consider the following syntax: __attribute__((saved(...),used(...),fixed(...))) ... as the equivalent to -fcall-saved-*, -fcall-used-*, and -ffixed-* respectively. In Linux/x86-64 we could then decorate the function __sw_hweight64() as: unsigned long __attribute__((saved(rdi,rsi,rdx,rcx,r8,r9,r10,r11))) __sw_hweight64(__u64 v); One major use for this for us is to be able to reduce the call site impact of certain small functions by reducing the used set of those functions. Please let me know if you need more examples.