asm-v8.S, [...]: New tests.

* gcc.target/cris/asm-v8.S, gcc.target/cris/asm-v10.S,
	gcc.target/cris/asm-other.S, gcc.target/cris/inasm-v8.c,
	gcc.target/cris/inasm-v10.c, gcc.target/cris/inasm-other.c:
	New tests.

From-SVN: r188052
This commit is contained in:
Hans-Peter Nilsson 2012-05-31 09:30:24 +00:00 committed by Hans-Peter Nilsson
parent e8baa9bc33
commit 37239ce661
7 changed files with 69 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2012-05-31 Hans-Peter Nilsson <hp@axis.com>
* gcc.target/cris/asm-v8.S, gcc.target/cris/asm-v10.S,
gcc.target/cris/asm-other.S, gcc.target/cris/inasm-v8.c,
gcc.target/cris/inasm-v10.c, gcc.target/cris/inasm-other.c:
New tests.
2012-05-30 Jason Merrill <jason@redhat.com> 2012-05-30 Jason Merrill <jason@redhat.com>
PR c++/53356 PR c++/53356

View File

@ -0,0 +1,15 @@
/* { dg-do assemble } */
/* { dg-options "-DOTHER_ISA=0 -march=v0" { target crisv32-*-* } } */
/* { dg-options "-DOTHER_ISA=32 -march=v32" { target cris-*-* } } */
/* Make sure we can assemble for the "other" variant, with the twist
that the gcc option -march=v0 isn't valid for the assembler. */
.text
#if OTHER_ISA == 32
addoq 42,$r1,$acr
#else
0:
move.d [$r2=$r0+42],$r1
bwf 0b
nop
#endif

View File

@ -0,0 +1,6 @@
/* { dg-do assemble } */
/* { dg-options "-DOTHER_ISA=10 -march=v10" } */
/* Check that -march=v10 is also recognized. */
#include "asm-other.S"

View File

@ -0,0 +1,6 @@
/* { dg-do assemble } */
/* { dg-options "-DOTHER_ISA=8 -march=v8" } */
/* Check that -march=v8 is also recognized. */
#include "asm-other.S"

View File

@ -0,0 +1,23 @@
/* { dg-do assemble } */
/* { dg-options "-DOTHER_ISA=0 -march=v0" { target crisv32-*-* } } */
/* { dg-options "-DOTHER_ISA=32 -march=v32" { target cris-*-* } } */
/* Make sure we can (generate code and) assemble for the "other"
variant, with the twist that the gcc option -march=v0 isn't
valid for the assembler. We don't check that the generated code
is for the other variant; other tests cover that already, but they
don't *assemble* the result. We can't trust the prologue and
epilogue to contain incompatible insns (they actually deliberately
don't, usually and it'd be brittle to tweak the function signature
to make it so), so we force some with inline asm. */
void f(void)
{
#if OTHER_ISA == 32
asm volatile ("addoq 42,$r11,$acr");
#else
asm volatile ("0: move.d [$r12=$sp+42],$r10\n\t"
"bwf 0b\n\t"
"nop");
#endif
}

View File

@ -0,0 +1,6 @@
/* { dg-do assemble } */
/* { dg-options "-DOTHER_ISA=10 -march=v10" } */
/* Check that -march=v10 is also recognized. */
#include "inasm-other.c"

View File

@ -0,0 +1,6 @@
/* { dg-do assemble } */
/* { dg-options "-DOTHER_ISA=8 -march=v8" } */
/* Check that -march=v8 is also recognized. */
#include "inasm-other.c"