summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/octeon-baddu-1.c
blob: 8dd5be1676598668967e6d10db3a4596311afc68 (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
/* { dg-do compile } */
/* { dg-options "-O -march=octeon" } */
/* { dg-final { scan-assembler-times "\tbaddu\t" 4 } } */
/* { dg-final { scan-assembler-not "\tandi\t" } } */

NOMIPS16 unsigned char
g (long long a, long long b)
{
  return a + b;
}

NOMIPS16 unsigned long long
h (unsigned long long a, unsigned long long b)
{
  unsigned char c = a + b;
  return c;
}

NOMIPS16 long long
ff (long long a, long long b)
{
  unsigned char c = a + b;
  return c;
}

NOMIPS16 int
gg (int a, int b)
{
  return (a + b) & 0xff;
}