barrel-shifter-1.c: New test.

2013-09-30  Simon Cook  <simon.cook@embecosm.com>
            Joern Rennecke  <joern.rennecke@embecosm.com>

        * gcc.target/arc/barrel-shifter-1.c: New test.
        * gcc.target/arc/barrel-shifter-2.c: Likewise.
        * gcc.target/arc/long-calls.c, gcc.target/arc/mA6.c: Likewise.
        * gcc.target/arc/mA7.c, gcc.target/arc/mARC600.c: Likewise.
        * gcc.target/arc/mARC601.c, gcc.target/arc/mARC700.c: Likewise.
        * gcc.target/arc/mcpu-arc600.c, gcc.target/arc/mcpu-arc601.c: Likewise.
        * gcc.target/arc/mcpu-arc700.c, gcc.target/arc/mcrc.c: Likewise.
        * gcc.target/arc/mdpfp.c, gcc.target/arc/mdsp-packa.c: Likewise.
        * gcc.target/arc/mdvbf.c, gcc.target/arc/mlock.c: Likewise.
        * gcc.target/arc/mmac-24.c, gcc.target/arc/mmac-d16.c: Likewise.
        * gcc.target/arc/mno-crc.c, gcc.target/arc/mno-dsp-packa.c: Likewise.
        * gcc.target/arc/mno-dvbf.c, gcc.target/arc/mno-lock.c: Likewise.
        * gcc.target/arc/mno-mac-24.c, gcc.target/arc/mno-mac-d16.c: Likewise.
        * gcc.target/arc/mno-rtsc.c, gcc.target/arc/mno-swape.c: Likewise.
        * gcc.target/arc/mno-xy.c, gcc.target/arc/mrtsc.c: Likewise.
        * gcc.target/arc/mspfp.c, gcc.target/arc/mswape.c: Likewise.
        * gcc.target/arc/mtune-ARC600.c: Likewise.
        * gcc.target/arc/mtune-ARC601.c: Likewise.
        * gcc.target/arc/mtune-ARC700-xmac: Likewise.
        * gcc.target/arc/mtune-ARC700.c: Likewise.
        * gcc.target/arc/mtune-ARC725D.c: Likewise.
        * gcc.target/arc/mtune-ARC750D.c: Likewise.
        * gcc.target/arc/mul64.c, gcc.target/arc/mxy.c: Likewise.
        * gcc.target/arc/no-dpfp-lrsr.c: Likewise.

Co-Authored-By: Joern Rennecke <joern.rennecke@embecosm.com>

From-SVN: r203025
This commit is contained in:
Simon Cook 2013-09-30 08:23:48 +00:00 committed by Joern Rennecke
parent 791d904434
commit ea5132bc5e
40 changed files with 344 additions and 0 deletions

View File

@ -1,3 +1,31 @@
2013-09-30 Simon Cook <simon.cook@embecosm.com>
Joern Rennecke <joern.rennecke@embecosm.com>
* gcc.target/arc/barrel-shifter-1.c: New test.
* gcc.target/arc/barrel-shifter-2.c: Likewise.
* gcc.target/arc/long-calls.c, gcc.target/arc/mA6.c: Likewise.
* gcc.target/arc/mA7.c, gcc.target/arc/mARC600.c: Likewise.
* gcc.target/arc/mARC601.c, gcc.target/arc/mARC700.c: Likewise.
* gcc.target/arc/mcpu-arc600.c, gcc.target/arc/mcpu-arc601.c: Likewise.
* gcc.target/arc/mcpu-arc700.c, gcc.target/arc/mcrc.c: Likewise.
* gcc.target/arc/mdpfp.c, gcc.target/arc/mdsp-packa.c: Likewise.
* gcc.target/arc/mdvbf.c, gcc.target/arc/mlock.c: Likewise.
* gcc.target/arc/mmac-24.c, gcc.target/arc/mmac-d16.c: Likewise.
* gcc.target/arc/mno-crc.c, gcc.target/arc/mno-dsp-packa.c: Likewise.
* gcc.target/arc/mno-dvbf.c, gcc.target/arc/mno-lock.c: Likewise.
* gcc.target/arc/mno-mac-24.c, gcc.target/arc/mno-mac-d16.c: Likewise.
* gcc.target/arc/mno-rtsc.c, gcc.target/arc/mno-swape.c: Likewise.
* gcc.target/arc/mno-xy.c, gcc.target/arc/mrtsc.c: Likewise.
* gcc.target/arc/mspfp.c, gcc.target/arc/mswape.c: Likewise.
* gcc.target/arc/mtune-ARC600.c: Likewise.
* gcc.target/arc/mtune-ARC601.c: Likewise.
* gcc.target/arc/mtune-ARC700-xmac: Likewise.
* gcc.target/arc/mtune-ARC700.c: Likewise.
* gcc.target/arc/mtune-ARC725D.c: Likewise.
* gcc.target/arc/mtune-ARC750D.c: Likewise.
* gcc.target/arc/mul64.c, gcc.target/arc/mxy.c: Likewise.
* gcc.target/arc/no-dpfp-lrsr.c: Likewise.
2013-09-30 Richard Biener <rguenther@suse.de>
PR middle-end/58532

View File

@ -0,0 +1,10 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mcpu=ARC601 -mbarrel-shifter" } */
int i;
int f (void)
{
i >>= 2;
}
/* { dg-final { scan-assembler "asr_s" } } */

View File

@ -0,0 +1,9 @@
/* { dg-do compile } */
int i;
int f (void)
{
i >>= 2;
}
/* { dg-final { scan-assembler "asr_s" } } */

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mlong-calls" } */
int g (void);
int f (void)
{
g();
}
/* { dg-final { scan-assembler "j @g" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mA6" } */
/* { dg-final { scan-assembler ".cpu ARC600" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mA7" } */
/* { dg-final { scan-assembler ".cpu ARC700" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mARC600" } */
/* { dg-final { scan-assembler ".cpu ARC600" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mARC601" } */
/* { dg-final { scan-assembler ".cpu ARC601" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mARC700" } */
/* { dg-final { scan-assembler ".cpu ARC700" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mcpu=ARC600" } */
/* { dg-final { scan-assembler ".cpu ARC600" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mcpu=ARC601" } */
/* { dg-final { scan-assembler ".cpu ARC601" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mcpu=ARC700" } */
/* { dg-final { scan-assembler ".cpu ARC700" } } */

View File

@ -0,0 +1,9 @@
/* { dg-do compile } */
/* { dg-options "-mcrc" } */
/* { dg-do assemble } */
int f (int i)
{
__asm__("crc %1, %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mdpfp" } */
double i;
int f (void)
{
i *= 2.0;
}
/* { dg-final { scan-assembler "daddh" } } */

View File

@ -0,0 +1,9 @@
/* { dg-do compile } */
/* { dg-options "-mdsp-packa" } */
/* { dg-do assemble } */
int f (int i)
{
__asm__("minidl %1, %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,9 @@
/* { dg-do compile } */
/* { dg-options "-mdvbf" } */
/* { dg-do assemble } */
int f (int i)
{
__asm__("vbfdw %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,12 @@
/* { dg-do compile } */
/* { dg-options "-mlock" } */
/* { dg-do assemble } */
int f (void *p)
{
int i;
__asm__("llock %0, [%1]\n\t"
"scond %0, [%1]" : "=&r"(i) : "r"(p));
return i;
}

View File

@ -0,0 +1,9 @@
/* { dg-do compile } */
/* { dg-options "-mmac-24" } */
/* { dg-do assemble } */
int f (int i)
{
__asm__("mult %1, %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,9 @@
/* { dg-do compile } */
/* { dg-options "-mmac-d16" } */
/* { dg-do assemble } */
int f (int i)
{
__asm__("muldw %1, %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mno-crc" } */
/* Would also like to assemble and check that we get the expected
"Error: bad instruction" assembler messages, but at the moment our
testharness can't do that. */
int f (int i)
{
__asm__("crc %1, %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mno-dsp-packa" } */
/* Would also like to assemble and check that we get the expected
"Error: bad instruction" assembler messages, but at the moment our
testharness can't do that. */
int f (int i)
{
__asm__("minidl %1, %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mno-dvbf" } */
/* Would also like to assemble and check that we get the expected
"Error: bad instruction" assembler messages, but at the moment our
testharness can't do that. */
int f (int i)
{
__asm__("vbfdw %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,14 @@
/* { dg-do compile } */
/* { dg-options "-mno-lock" } */
/* Would also like to assemble and check that we get the expected
"Error: bad instruction" assembler messages, but at the moment our
testharness can't do that. */
int f (void *p)
{
int i;
__asm__("llock %0, [%1]\n\t"
"scond %0, [%1]" : "=&r"(i) : "r"(p));
return i;
}

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mno-mac-24" } */
/* Would also like to assemble and check that we get the expected
"Error: bad instruction" assembler messages, but at the moment our
testharness can't do that. */
int f (int i)
{
__asm__("mult %1, %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mno-mac-d16" } */
/* Would also like to assemble and check that we get the expected
"Error: bad instruction" assembler messages, but at the moment our
testharness can't do that. */
int f (int i)
{
__asm__("muldw %1, %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mno-rtsc" } */
/* Would also like to assemble and check that we get the expected
"Error: bad instruction" assembler messages, but at the moment our
testharness can't do that. */
int f (int i)
{
__asm__("rtsc %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mno-swape" } */
/* Would also like to assemble and check that we get the expected
"Error: bad instruction" assembler messages, but at the moment our
testharness can't do that. */
int f (int i)
{
__asm__("swape %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,10 @@
/* { dg-do compile } */
/* { dg-options "-mno-xy" } */
/* Would also like to assemble and check that we get the expected
"Error: bad instruction" assembler messages, but at the moment our
testharness can't do that. */
void f (int i)
{
__asm__("add x0_u0, x0_u0, %0" : : "r" (i));
}

View File

@ -0,0 +1,9 @@
/* { dg-do compile } */
/* { dg-options "-mrtsc" } */
/* { dg-do assemble } */
int f (int i)
{
__asm__("rtsc %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mspfp" } */
float i;
int f (void)
{
i *= 2.0;
}
/* { dg-final { scan-assembler "fadd" } } */

View File

@ -0,0 +1,9 @@
/* { dg-do compile } */
/* { dg-options "-mswape" } */
/* { dg-do assemble } */
int f (int i)
{
__asm__("swape %1, %1" : "=r"(i) : "r"(i));
return i;
}

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mtune=ARC600" } */
/* { dg-final { scan-assembler ".cpu ARC700" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mtune=ARC601" } */
/* { dg-final { scan-assembler ".cpu ARC700" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mtune=ARC700-xmac" } */
/* { dg-final { scan-assembler ".cpu ARC700" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mtune=ARC700" } */
/* { dg-final { scan-assembler ".cpu ARC700" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mtune=ARC725D" } */
/* { dg-final { scan-assembler ".cpu ARC700" } } */

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-mtune=ARC750D" } */
/* { dg-final { scan-assembler ".cpu ARC700" } } */

View File

@ -0,0 +1,13 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mcpu=ARC600 -mmul64" } */
#include <stdint.h>
int64_t i;
int j, k;
int f (void)
{
i = j * k;
}
/* { dg-final { scan-assembler "mul64" } } */

View File

@ -0,0 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-mxy" } */
/* { dg-do assemble } */
void f (int i)
{
__asm__("add x0_u0, x0_u0, %0" : : "r" (i));
}

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mdpfp -mno-dpfp-lrsr" } */
double i;
int f (void)
{
i *= 2.0;
}
/* { dg-final { scan-assembler-not "\tlr" } } */