This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [RFC] PR target/52813 and target/11807
On Wed, 12 Dec 2018 at 10:42, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
>
> On Tue, 11 Dec 2018 at 16:52, Richard Sandiford
> <richard.sandiford@arm.com> wrote:
> >
> > Dimitar Dimitrov <dimitar@dinux.eu> writes:
> > > On понеделник, 10 декември 2018 г. 11:21:53 EET Richard Sandiford wrote:
> > >> Dimitar Dimitrov <dimitar@dinux.eu> writes:
> > >> > I have tested this fix on x86_64 host, and found no regression in the C
> > >> > and C++ testsuites. I'm marking this patch as RFC simply because I don't
> > >> > have experience with other architectures, and I don't have a setup to
> > >> > test all architectures supported by GCC.
> > >> >
> > >> > gcc/ChangeLog:
> > >> >
> > >> > 2018-12-07 Dimitar Dimitrov <dimitar@dinux.eu>
> > >> >
> > >> > * cfgexpand.c (asm_clobber_reg_is_valid): Also produce
> > >> > error when stack pointer is clobbered.
> > >> > (expand_asm_stmt): Refactor clobber check in separate function.
> > >> >
> > >> > gcc/testsuite/ChangeLog:
> > >> >
> > >> > 2018-12-07 Dimitar Dimitrov <dimitar@dinux.eu>
> > >> >
> > >> > * gcc.target/i386/pr52813.c: New test.
> > >> >
> > >> > Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
> > >>
> > >> LGTM. Do you have a copyright assignment on file? 'Fraid this is
> > >> probably big enough to need one.
> > > Yes, I have copyright assignment.
> >
> > OK, great. I went ahead and applied the patch.
> >
>
> Hi,
>
> This patch introduces a regression on arm:
> FAIL: gcc.target/arm/pr77904.c (test for excess errors)
> Excess errors:
> /gcc/testsuite/gcc.target/arm/pr77904.c:7:3: error: Stack Pointer
> register clobbered by 'sp' in 'asm'
>
> Indeed the testcase has an explicit:
> __asm volatile ("" : : : "sp");
> which is now rejected.
>
> Thomas, is that mandatory to test your code to fix pr77904?
>
> Thanks,
>
> Christophe
>
And just noticed it causes a failure to build GDB for x86_64:
gdb-8.1-release/gdb/nat/linux-ptrace.c: In function 'void
linux_ptrace_init_warnings()':
gdb-8.1-release/gdb/nat/linux-ptrace.c:149:23: error: Stack Pointer
register clobbered by '%rsp' in 'asm'
149 | : "%rsp", "memory");
| ^
Makefile:1640: recipe for target 'linux-ptrace.o' failed
I didn't check if the GDB code is legitimate though....
> > Thanks,
> > Richard