public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hpa at zytor dot com" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-56314-4-SXOTAP960A@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56314-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56314

--- Comment #2 from H. Peter Anvin <hpa at zytor dot com> 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.


  parent reply	other threads:[~2013-02-14  2:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14  1:56 [Bug other/56314] New: " hpa at zytor dot com
2013-02-14  2:04 ` [Bug other/56314] " pinskia at gcc dot gnu.org
2013-02-14  2:24 ` hpa at zytor dot com [this message]
2013-02-14 10:29 ` [Bug middle-end/56314] " rguenth at gcc dot gnu.org
2013-02-15  6:52 ` benh at kernel dot crashing.org
2013-02-15  6:56 ` pinskia at gcc dot gnu.org
2022-10-03 16:20 ` hpa at zytor dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56314-4-SXOTAP960A@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).