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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [vsx-vector-3.c] - Blame information for rev 322

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 322 jeremybenn
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3
/* { dg-require-effective-target powerpc_vsx_ok } */
4
/* { dg-options "-O2 -ftree-vectorize -mcpu=power7" } */
5
/* { dg-final { scan-assembler "xvadddp" } } */
6
/* { dg-final { scan-assembler "xvsubdp" } } */
7
/* { dg-final { scan-assembler "xvmuldp" } } */
8
/* { dg-final { scan-assembler "xvdivdp" } } */
9
/* { dg-final { scan-assembler "xvmadd" } } */
10
/* { dg-final { scan-assembler "xvmsub" } } */
11
 
12
__vector double a, b, c, d;
13
 
14
void
15
vector_add (void)
16
{
17
  a = b + c;
18
}
19
 
20
void
21
vector_subtract (void)
22
{
23
  a = b - c;
24
}
25
 
26
void
27
vector_multiply (void)
28
{
29
  a = b * c;
30
}
31
 
32
void
33
vector_multiply_add (void)
34
{
35
  a = (b * c) + d;
36
}
37
 
38
void
39
vector_multiply_subtract (void)
40
{
41
  a = (b * c) - d;
42
}
43
 
44
void
45
vector_divide (void)
46
{
47
  a = b / c;
48
}

powered by: WebSVN 2.1.0

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