mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-16 04:40:25 +08:00
C-SKY: Skip other CPUs if the testcases are only for ck801.
Refine some testcases for ck801, if the testcase is only for ck801, add the filename prefix "ck801-", and add dg-skip-if to skip other CPUs. gcc/testsuite/ * gcc.target/csky/and3a.c: Rename to ... * gcc.target/csky/ck801-and.c: ... this. * gcc.target/csky/constpool-3.c: Rename to ... * gcc.target/csky/constpool-2.c: ... this, Rename to ... * gcc.target/csky/constpool-1.c: ... this, Rename to ... * gcc.target/csky/ck801-constpool.c: ... this, and skip if the CPU is not ck801. * gcc.target/csky/ck801-branch.c: Skip if the CPU is not ck801.
This commit is contained in:
parent
288b18bf07
commit
b86703a050
@ -1,5 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-csky-options "-mcpu=ck801 -O1" } */
|
||||
/* { dg-skip-if "test is specific to ck801" { csky-*-* } { "*" } { "-mcpu=ck801" } } */
|
||||
/* { dg-csky-options "-O1" } */
|
||||
|
||||
/* Test special code generation patterns for bit operators. */
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-csky-options "-mcpu=ck801 -O1 -fno-reorder-blocks" } */
|
||||
/* { dg-skip-if "test is specific to ck801" { csky-*-* } { "*" } { "-mcpu=ck801" } } */
|
||||
/* { dg-csky-options "-O1 -fno-reorder-blocks" } */
|
||||
|
||||
/* Test branch generation on CK801, which cannot rely on assembler
|
||||
branch relaxation because long branches clobber lr. */
|
||||
|
17
gcc/testsuite/gcc.target/csky/ck801-constpool.c
Normal file
17
gcc/testsuite/gcc.target/csky/ck801-constpool.c
Normal file
@ -0,0 +1,17 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-skip-if "test is specific to ck801" { csky-*-* } { "*" } { "-mcpu=ck801" } } */
|
||||
/* { dg-csky-options "-O1" } */
|
||||
|
||||
/* Make sure that constant pools are emitted by the compiler for ck801.
|
||||
If this is deferred to the assembler, the compiler will compute
|
||||
incorrect branch offsets. */
|
||||
|
||||
void f (unsigned int *u, long long int *l, float *f, double *d)
|
||||
{
|
||||
*u = 0xdeadbeef;
|
||||
*l = 0xcafef00dc0ffeeULL;
|
||||
*f = 3.14159F;
|
||||
*d = 2.718281828459;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "\\.long" 6 } } */
|
@ -1,9 +1,8 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-csky-options "-mcpu=ck801 -O1" } */
|
||||
/* { dg-csky-options "-mcpu=ck810f -O1 -mconstpool" } */
|
||||
|
||||
/* Make sure that constant pools are emitted by the compiler for ck801.
|
||||
If this is deferred to the assembler, the compiler will compute
|
||||
incorrect branch offsets. */
|
||||
/* Make sure that constant pools are emitted by the compiler when
|
||||
-mconstpool is provided. */
|
||||
|
||||
void f (unsigned int *u, long long int *l, float *f, double *d)
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-csky-options "-mcpu=ck810f -O1 -mconstpool" } */
|
||||
/* { dg-csky-options "-mcpu=ck810f -O1 -mno-constpool" } */
|
||||
|
||||
/* Make sure that constant pools are emitted by the compiler when
|
||||
-mconstpool is provided. */
|
||||
/* Make sure that constant pools are not emitted by the compiler when
|
||||
-mno-constpool is provided. */
|
||||
|
||||
void f (unsigned int *u, long long int *l, float *f, double *d)
|
||||
{
|
||||
@ -12,4 +12,4 @@ void f (unsigned int *u, long long int *l, float *f, double *d)
|
||||
*d = 2.718281828459;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "\\.long" 6 } } */
|
||||
/* { dg-final { scan-assembler-not "\\.long" } } */
|
||||
|
@ -1,15 +0,0 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-csky-options "-mcpu=ck810f -O1 -mno-constpool" } */
|
||||
|
||||
/* Make sure that constant pools are not emitted by the compiler when
|
||||
-mno-constpool is provided. */
|
||||
|
||||
void f (unsigned int *u, long long int *l, float *f, double *d)
|
||||
{
|
||||
*u = 0xdeadbeef;
|
||||
*l = 0xcafef00dc0ffeeULL;
|
||||
*f = 3.14159F;
|
||||
*d = 2.718281828459;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-not "\\.long" } } */
|
Loading…
x
Reference in New Issue
Block a user