aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/acle/dsp_arith.c
blob: 7bf458e8f8ddb04c83ae95ff8b7508dccd2427d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* { dg-do compile } */
/* { dg-require-effective-target arm_dsp_ok } */
/* { dg-add-options arm_dsp } */

#include <arm_acle.h>

int32_t
test_qadd (int32_t a, int32_t b)
{
  return __qadd (a, b);
}

int32_t
test_qdbl (int32_t a)
{
  return __qdbl(a);
}

/* { dg-final { scan-assembler-times "qadd\t...?, ...?, ...?" 2 } } */

int32_t
test_qsub (int32_t a, int32_t b)
{
  return __qsub (a, b);
}

/* { dg-final { scan-assembler-times "qsub\t...?, ...?, ...?" 1 } } */

int32_t
test_smlabb (int32_t a, int32_t b, int32_t c)
{
  return __smlabb (a, b, c);
}

/* { dg-final { scan-assembler-times "smlabb\t...?, ...?, ...?, ...?" 1 } } */

int32_t
test_smlabt (int32_t a, int32_t b, int32_t c)
{
  return __smlabt (a, b, c);
}

int32_t
test_smlatb (int32_t a, int32_t b, int32_t c)
{
  return __smlatb (a, b, c);
}

/* { dg-final { scan-assembler-times "smlatb\t...?, ...?, ...?, ...?" 2 } } */

int32_t
test_smlatt (int32_t a, int32_t b, int32_t c)
{
  return __smlatt (a, b, c);
}

/* { dg-final { scan-assembler-times "smlatt\t...?, ...?, ...?, ...?" 1 } } */

int32_t
test_smlawb (int32_t a, int32_t b, int32_t c)
{
  return __smlawb (a, b, c);
}

/* { dg-final { scan-assembler-times "smlawb\t...?, ...?, ...?, ...?" 1 } } */

int32_t
test_smlawt (int32_t a, int32_t b, int32_t c)
{
  return __smlawt (a, b, c);
}

/* { dg-final { scan-assembler-times "smlawt\t...?, ...?, ...?, ...?" 1 } } */