diff options
Diffstat (limited to 'gcc-4.8.1/gcc/testsuite/gcc.target/spu/pr40001.c')
-rw-r--r-- | gcc-4.8.1/gcc/testsuite/gcc.target/spu/pr40001.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/spu/pr40001.c b/gcc-4.8.1/gcc/testsuite/gcc.target/spu/pr40001.c new file mode 100644 index 000000000..442f72d4f --- /dev/null +++ b/gcc-4.8.1/gcc/testsuite/gcc.target/spu/pr40001.c @@ -0,0 +1,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); +} + |