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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20001226-1.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
/* { dg-do assemble } */
2
/* { dg-skip-if "too much code for avr" { "avr-*-*" } { "*" } { "" } } */
3
/* { dg-skip-if "too much code for pdp11" { "pdp11-*-*" } { "*" } { "" } } */
4
/* { dg-xfail-if "jump beyond 128K not supported" { xtensa*-*-* } { "-O0" } { "" } } */
5
/* { dg-xfail-if "PR36698" { spu-*-* } { "-O0" } { "" } } */
6
/* { dg-skip-if "" { m32c-*-* } { "*" } { "" } } */
7
/* { dg-timeout-factor 4.0 } */
8
 
9
/* This testcase exposed two branch shortening bugs on powerpc.  */
10
 
11
#define C(a,b) \
12
  if (a > b)  goto gt; \
13
  if (a < b)  goto lt;
14
 
15
#define C4(x,b) C((x)[0], b) C((x)[1],b) C((x)[2],b) C((x)[3],b)
16
#define C16(x,y) C4(x, (y)[0]) C4(x, (y)[1]) C4(x, (y)[2]) C4(x, (y)[3])
17
 
18
#define C64(x,y) C16(x,y) C16(x+4,y) C16(x+8,y) C16(x+12,y)
19
#define C256(x,y) C64(x,y) C64(x,y+4) C64(x,y+8) C64(x,y+12)
20
 
21
#define C1024(x,y) C256(x,y) C256(x+16,y) C256(x+32,y) C256(x+48,y)
22
#define C4096(x,y) C1024(x,y) C1024(x,y+16) C1024(x,y+32) C1024(x,y+48)
23
 
24
#ifdef __mips
25
/* See PR 51931.  */
26
__attribute__((nomips16))
27
#endif
28
unsigned foo(int x[64], int y[64])
29
{
30
  C4096(x,y);
31
 
32
  return 0x01234567;
33
 gt:
34
  return 0x12345678;
35
 lt:
36
  return 0xF0123456;
37
}
38
 

powered by: WebSVN 2.1.0

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