aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/spu/pr40001.c
blob: 442f72d4fa85b0af41abae12019dd63205ff7ab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "-O" } */

void *
sbrk (unsigned int increment)
{
  volatile register
      __attribute__ ((__spu_vector__)) unsigned int sp_r1 __asm__ ("1");
  unsigned int sps;

  sps = __builtin_spu_extract (sp_r1, 0);
  if (sps - 4096 >= increment)
    return 0;
  else
    return ((void *) -1);
}