[Bug other/56314] Please allow per-function specification of register conventions
hpa at zytor dot com
gcc-bugzilla@gcc.gnu.org
Thu Feb 14 02:24:00 GMT 2013
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.
More information about the Gcc-bugs
mailing list