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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20001226-1.c] - Blame information for rev 149

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* This does not assemble on m68hc11 because the function is larger
2
   than 64K.  */
3
/* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
4
/* { dg-xfail-if "jump beyond 128K not supported" "xtensa-*-*" "-O0" "" } */
5
/* { dg-skip-if "" { m32c-*-* } { "*" } { "" } } */
6
 
7
/* This testcase exposed two branch shortening bugs on powerpc.  */
8
 
9
#define C(a,b) \
10
  if (a > b)  goto gt; \
11
  if (a < b)  goto lt;
12
 
13
#define C4(x,b) C((x)[0], b) C((x)[1],b) C((x)[2],b) C((x)[3],b)
14
#define C16(x,y) C4(x, (y)[0]) C4(x, (y)[1]) C4(x, (y)[2]) C4(x, (y)[3])
15
 
16
#define C64(x,y) C16(x,y) C16(x+4,y) C16(x+8,y) C16(x+12,y)
17
#define C256(x,y) C64(x,y) C64(x,y+4) C64(x,y+8) C64(x,y+12)
18
 
19
#define C1024(x,y) C256(x,y) C256(x+16,y) C256(x+32,y) C256(x+48,y)
20
#define C4096(x,y) C1024(x,y) C1024(x,y+16) C1024(x,y+32) C1024(x,y+48)
21
 
22
unsigned foo(int x[64], int y[64])
23
{
24
  C4096(x,y);
25
 
26
  return 0x01234567;
27
 gt:
28
  return 0x12345678;
29
 lt:
30
  return 0xF0123456;
31
}
32
 

powered by: WebSVN 2.1.0

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