public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: qu <xianmiao@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5083] C-SKY: Skip other CPUs if the testcases are only for ck801. Date: Tue, 10 Jan 2023 11:58:17 +0000 (GMT) [thread overview] Message-ID: <20230110115817.AA5C0385840A@sourceware.org> (raw) https://gcc.gnu.org/g:b86703a050c61d0dc81410de707b078a27ce4732 commit r13-5083-gb86703a050c61d0dc81410de707b078a27ce4732 Author: Xianmiao Qu <cooper.qu@linux.alibaba.com> Date: Tue Nov 1 15:49:03 2022 +0800 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. Diff: --- gcc/testsuite/gcc.target/csky/{and3a.c => ck801-and.c} | 3 ++- gcc/testsuite/gcc.target/csky/ck801-branch.c | 3 ++- gcc/testsuite/gcc.target/csky/ck801-constpool.c | 17 +++++++++++++++++ gcc/testsuite/gcc.target/csky/constpool-1.c | 7 +++---- gcc/testsuite/gcc.target/csky/constpool-2.c | 8 ++++---- gcc/testsuite/gcc.target/csky/constpool-3.c | 15 --------------- 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/gcc/testsuite/gcc.target/csky/and3a.c b/gcc/testsuite/gcc.target/csky/ck801-and.c similarity index 64% rename from gcc/testsuite/gcc.target/csky/and3a.c rename to gcc/testsuite/gcc.target/csky/ck801-and.c index 3d706f6eb58..7c79879278d 100644 --- a/gcc/testsuite/gcc.target/csky/and3a.c +++ b/gcc/testsuite/gcc.target/csky/ck801-and.c @@ -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. */ diff --git a/gcc/testsuite/gcc.target/csky/ck801-branch.c b/gcc/testsuite/gcc.target/csky/ck801-branch.c index 95e69624475..e4dafb37e89 100644 --- a/gcc/testsuite/gcc.target/csky/ck801-branch.c +++ b/gcc/testsuite/gcc.target/csky/ck801-branch.c @@ -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. */ diff --git a/gcc/testsuite/gcc.target/csky/ck801-constpool.c b/gcc/testsuite/gcc.target/csky/ck801-constpool.c new file mode 100644 index 00000000000..5c92f39d0ab --- /dev/null +++ b/gcc/testsuite/gcc.target/csky/ck801-constpool.c @@ -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 } } */ diff --git a/gcc/testsuite/gcc.target/csky/constpool-1.c b/gcc/testsuite/gcc.target/csky/constpool-1.c index 5c7cfdc73bd..d654420bc3f 100644 --- a/gcc/testsuite/gcc.target/csky/constpool-1.c +++ b/gcc/testsuite/gcc.target/csky/constpool-1.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/csky/constpool-2.c b/gcc/testsuite/gcc.target/csky/constpool-2.c index d654420bc3f..e3a6e095f5b 100644 --- a/gcc/testsuite/gcc.target/csky/constpool-2.c +++ b/gcc/testsuite/gcc.target/csky/constpool-2.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.target/csky/constpool-3.c b/gcc/testsuite/gcc.target/csky/constpool-3.c deleted file mode 100644 index e3a6e095f5b..00000000000 --- a/gcc/testsuite/gcc.target/csky/constpool-3.c +++ /dev/null @@ -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" } } */
reply other threads:[~2023-01-10 11:58 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230110115817.AA5C0385840A@sourceware.org \ --to=xianmiao@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).