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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20001226-1.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* 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
 
6
/* This testcase exposed two branch shortening bugs on powerpc.  */
7
 
8
#define C(a,b) \
9
  if (a > b)  goto gt; \
10
  if (a < b)  goto lt;
11
 
12
#define C4(x,b) C((x)[0], b) C((x)[1],b) C((x)[2],b) C((x)[3],b)
13
#define C16(x,y) C4(x, (y)[0]) C4(x, (y)[1]) C4(x, (y)[2]) C4(x, (y)[3])
14
 
15
#define C64(x,y) C16(x,y) C16(x+4,y) C16(x+8,y) C16(x+12,y)
16
#define C256(x,y) C64(x,y) C64(x,y+4) C64(x,y+8) C64(x,y+12)
17
 
18
#define C1024(x,y) C256(x,y) C256(x+16,y) C256(x+32,y) C256(x+48,y)
19
#define C4096(x,y) C1024(x,y) C1024(x,y+16) C1024(x,y+32) C1024(x,y+48)
20
 
21
unsigned foo(int x[64], int y[64])
22
{
23
  C4096(x,y);
24
 
25
  return 0x01234567;
26
 gt:
27
  return 0x12345678;
28
 lt:
29
  return 0xF0123456;
30
}
31
 

powered by: WebSVN 2.1.0

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