This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR33661 Fix problem with register asm in templates
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 12 Jun 2015 11:24:13 +0200
- Subject: Re: [PATCH] PR33661 Fix problem with register asm in templates
- Authentication-results: sourceware.org; auth=none
- References: <20150611134948 dot GA14778 at maggie> <20150611140512 dot GA10247 at tucnak dot redhat dot com> <20150612085256 dot GA29958 at maggie>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jun 12, 2015 at 10:52:56AM +0200, Andreas Krebbel wrote:
> Yes that's better. I've adjusted the testcase as you proposed and
> have tested it on x86_64, ppc, and s390x with -m32(-m31) and -m64.
As I said earlier, talking just about the testcase, leaving review to Jason.
> --- /dev/null
> +++ b/gcc/testsuite/g++.dg/pr33661.C
> @@ -0,0 +1,31 @@
> +/* PR c++/33661 */
> +
> +/* { dg-do compile } */
> +/* { dg-options "-O1" } */
> +/* { dg-final { scan-assembler "reg: %r8" { target { { x86_64*-*-* i?86-*-* } && lp64 } } } } */
> +/* { dg-final { scan-assembler "reg: %ecx" { target { { x86_64*-*-* i?86-*-* } && ia32 } } } } */
> +/* { dg-final { scan-assembler "reg: 8" { target { powerpc*-*-* } } } } */
Looks mostly good, just wonder about the powerpc scan-assembler.
Shouldn't that be "reg: (%r)?8" instead? I think powerpc has -mregnames
option, dunno if some target doesn't even use it by default.
Jakub