This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] [RFC] PR target/52813 and target/11807
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Dimitar Dimitrov <dimitar at dinux dot eu>, Bernd Edlinger <bernd dot edlinger at hotmail dot de>, Christophe Lyon <christophe dot lyon at linaro dot org>, Thomas Preudhomme <thomas dot preudhomme at linaro dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, richard dot sandiford at arm dot com
- Date: Mon, 17 Dec 2018 09:54:26 -0600
- Subject: Re: [PATCH] [RFC] PR target/52813 and target/11807
- References: <DB7PR07MB53537B024F807B2F383C87B0E4A30@DB7PR07MB5353.eurprd07.prod.outlook.com> <85840089.MtehzfUrTt@tpdeb> <firstname.lastname@example.org>
On Mon, Dec 17, 2018 at 11:47:42AM +0000, Richard Sandiford wrote:
> Dimitar Dimitrov <email@example.com> writes:
> > On Sun, Dec 16 2018 at 14:36:26 EET Bernd Edlinger wrote:
> >> Hi,
> >> if I understood that right, then clobbering sp is and has always been
> >> ignored.
> PR77904 was about the clobber not being ignored, so the behaviour
> hasn't been consistent.
> I'm also not sure it was always ignored in recent sources. The clobber
> does get added to the associated rtl insn, and it'd be surprising if
> that never had an effect.
Yes, you will usually get a frame pointer. My point was that the epilogue
will restore your stack pointer both with and without the asm clobber.
> I don't think there's a good reason to treat this differently from the
> preexisting PIC register error. If the argument for making it a warning
> rather than an error is that the asm might happen to work by accident,
> then the same is true for the PIC register.
Yes. As well as quite a few more registers, many of those specific to
the target. And there are many more things you can do terribly wrong in
inline assembler, of course, most of which we can never detect.