OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [sparc/] [fpaddsubi.c] - Blame information for rev 753

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -mcpu=ultrasparc -mvis" } */
3
typedef int __v2si __attribute__((vector_size(8)));
4
typedef int __v1si __attribute__((vector_size(4)));
5
typedef short __v4hi __attribute__((vector_size(8)));
6
typedef short __v2hi __attribute__((vector_size(4)));
7
 
8
extern __v1si foo_x (void);
9
extern __v1si foo_y (void);
10
 
11
__v4hi test_fpadd16 (__v4hi x, __v4hi y)
12
{
13
  return __builtin_vis_fpadd16 (x, y);
14
}
15
 
16
__v2hi test_fpadd16s (__v2hi x, __v2hi y)
17
{
18
  return __builtin_vis_fpadd16s (x, y);
19
}
20
 
21
__v4hi test_fpsub16 (__v4hi x, __v4hi y)
22
{
23
  return __builtin_vis_fpsub16 (x, y);
24
}
25
 
26
__v2hi test_fpsub16s (__v2hi x, __v2hi y)
27
{
28
  return __builtin_vis_fpsub16s (x, y);
29
}
30
 
31
__v2si test_fpadd32 (__v2si x, __v2si y)
32
{
33
  return __builtin_vis_fpadd32 (x, y);
34
}
35
 
36
__v1si test_fpadd32s (void)
37
{
38
  return __builtin_vis_fpadd32s (foo_x (), foo_y ());
39
}
40
 
41
__v2si test_fpsub32 (__v2si x, __v2si y)
42
{
43
  return __builtin_vis_fpsub32 (x, y);
44
}
45
 
46
__v1si test_fpsub32s (__v1si x, __v1si y)
47
{
48
  return __builtin_vis_fpsub32s (foo_x (), foo_y ());
49
}
50
 
51
/* { dg-final { scan-assembler "fpadd16\t%" }  } */
52
/* { dg-final { scan-assembler "fpadd16s\t%" }  } */
53
/* { dg-final { scan-assembler "fpsub16\t%" }  } */
54
/* { dg-final { scan-assembler "fpsub16s\t%" }  } */
55
/* { dg-final { scan-assembler "fpadd32\t%" }  } */
56
/* { dg-final { scan-assembler "fpadd32s\t%" }  } */
57
/* { dg-final { scan-assembler "fpsub32\t%" }  } */
58
/* { dg-final { scan-assembler "fpsub32s\t%" }  } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.