This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Martin Sebor <msebor at gmail dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 14 Nov 2018 06:22:51 -0600
- Subject: Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)
Btw, if you just add
void *
retsp (void)
{
register void *sp __asm ("sp");
asm ("" : "+g" (sp)); // <-- this line
return sp;
}
everything works fine.
Segher