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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [ppu-intrinsics.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do link { target { *-*-linux* && powerpc_fprs } } } */
2
/* { dg-options "-W -Wall -Wno-uninitialized -Wno-unused-but-set-variable -mcpu=cell" } */
3
/* Test some PPU intrinsics from <ppu_intrinsics.h>.  */
4
 
5
#include <ppu_intrinsics.h>
6
 
7
int main ()
8
{
9
  double d, d1, d2;
10
  float f, f1, f2;
11
  unsigned long long ull, a, b;
12
  long long ll;
13
  int i;
14
 
15
#ifdef __powerpc64__
16
  ull = __rldcl (a, b, 3);
17
  ull = __rldcr (a, b, 3);
18
  ull = __rldic (a, 3, 4);
19
  ull = __rldicl (a, 4, 5);
20
  ull = __rldicr (a, 2, 3);
21
  ull = __rldimi (a, b, 4, 6);
22
#endif
23
  ull = __rlwimi (a, b, 6, 9, 12);
24
  ull = __rlwnm (a, b, 3, 5);
25
  d = __fmul (d1, d2);
26
  f = __fmuls (f1, f2);
27
  f = __frsp (f);
28
  d = __fcfid (ll);
29
  d = __frsqrte (d1);
30
  ll = __fctid (d);
31
  ll = __fctidz (d);
32
  i = __fctiw (d);
33
  i = __fctiwz (d);
34
 
35
  __protected_stream_count (1, 2);
36
  __protected_stream_go ();
37
  __protected_stream_set (1, 0x1000, 3);
38
  __protected_stream_stop (3);
39
  __protected_stream_stop_all ();
40
  __protected_unlimited_stream_set (3, 0x1000, 1);
41
 
42
  return 0;
43
}

powered by: WebSVN 2.1.0

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