This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc feature request / RFC: extra clobbered regs
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Vladimir Makarov <vmakarov at redhat dot com>
- Cc: Andy Lutomirski <luto at kernel dot org>, gcc at gcc dot gnu dot org, "linux-kernel at vger dot kernel dot org" <linux-kernel at vger dot kernel dot org>, Linus Torvalds <torvalds at linux-foundation dot org>, "H. Peter Anvin" <hpa at zytor dot com>, Ingo Molnar <mingo at kernel dot org>, Thomas Gleixner <tglx at linutronix dot de>
- Date: Wed, 1 Jul 2015 19:43:33 +0200
- Subject: Re: gcc feature request / RFC: extra clobbered regs
- Authentication-results: sourceware.org; auth=none
- References: <CALCETrX6j9vBZR7RirXf8usz1Y4f-1TnVaYTVg0_PgQCeWZnRg at mail dot gmail dot com> <20150630213736 dot GQ10247 at tucnak dot redhat dot com> <559405E5 dot 7000405 at redhat dot com> <20150701153133 dot GY10247 at tucnak dot redhat dot com> <559424D4 dot 6010908 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jul 01, 2015 at 01:35:16PM -0400, Vladimir Makarov wrote:
> Actually it raise a question for me. If we describe that a function
> clobbers more than calling convention and then use it as a value (assigning
> a variable or passing as an argument) and loosing a track of it and than
> call it. How can RA know what the call clobbers actually. So for the
> function with the attributes we should prohibit use it as a value or make
> the attributes as a part of the function type, or at least say it is unsafe.
> So now I see this as a *bigger problem* with this extension. Although I
> guess it already exists as we have description of different ABI as an
> extension.
Unfortunately target attribute is function decl attribute rather than
function type. And having more attributes affect switchable targets will be
non-fun.
Jakub