Commit 3f868e1c by Chao-ying Fu Committed by Chao-ying Fu

mips32-dspr2-type.c: New test.

* gcc.target/mips/mips32-dspr2-type.c: New test.
* gcc.target/mips/mips32-dspr2.c: New test.
* gcc.target/mips/dspr2-MULT.c: New test.
* gcc.target/mips/dspr2-MULTU.c: New test.
* gcc.target/mips/mips32-dsp-run.c: New test to check execution.
* gcc.target/mips/mips32-dsp.c: Change v4i8 typedef to use signed char.
Adjust some formats.

From-SVN: r122757
parent 32041385
2007-03-09 Chao-ying Fu <fu@mips.com>
* gcc.target/mips/mips32-dspr2-type.c: New test.
* gcc.target/mips/mips32-dspr2.c: New test.
* gcc.target/mips/dspr2-MULT.c: New test.
* gcc.target/mips/dspr2-MULTU.c: New test.
* gcc.target/mips/mips32-dsp-run.c: New test to check execution.
* gcc.target/mips/mips32-dsp.c: Change v4i8 typedef to use signed char.
Adjust some formats.
2007-03-09 Dirk Mueller <dmueller@suse.de>
PR c++/17946
/* Test MIPS32 DSP REV 2 MULT instruction */
/* { dg-do compile } */
/* { dg-mips-options "-march=mips32r2 -mdspr2 -O2 -ffixed-hi -ffixed-lo" } */
/* { dg-final { scan-assembler "\tmult\t" } } */
/* { dg-final { scan-assembler "ac1" } } */
/* { dg-final { scan-assembler "ac2" } } */
/* { dg-final { scan-assembler "ac3" } } */
typedef long long a64;
a64 a[4];
int b[4], c[4];
void test ()
{
a[0] = (a64) b[0] * c[0];
a[1] = (a64) b[1] * c[1];
a[2] = (a64) b[2] * c[2];
a[3] = (a64) b[3] * c[3];
}
/* Test MIPS32 DSP REV 2 MULTU instruction */
/* { dg-do compile } */
/* { dg-mips-options "-march=mips32r2 -mdspr2 -O2 -ffixed-hi -ffixed-lo" } */
/* { dg-final { scan-assembler "\tmultu\t" } } */
/* { dg-final { scan-assembler "ac1" } } */
/* { dg-final { scan-assembler "ac2" } } */
/* { dg-final { scan-assembler "ac3" } } */
typedef long long a64;
a64 a[4];
unsigned int b[4], c[4];
void test ()
{
a[0] = (a64) b[0] * c[0];
a[1] = (a64) b[1] * c[1];
a[2] = (a64) b[2] * c[2];
a[3] = (a64) b[3] * c[3];
}
/* Test MIPS32 DSP REV 2 instructions */
/* { dg-do compile } */
/* { dg-mips-options "-march=mips32r2 -mdspr2" } */
/* { dg-final { scan-assembler "\tmul.ph\t" } } */
typedef short v2hi __attribute__ ((vector_size(4)));
v2hi mul_v2hi (v2hi a, v2hi b)
{
return a * b;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment