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/] [execute/] [20040218-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
/* PR target/14209.  Bug in cris.md, shrinking access size of
2
   postincrement.
3
   Origin: <hp@axis.com>.  */
4
 
5
long int xb (long int *y) __attribute__ ((__noinline__));
6
long int xw (long int *y) __attribute__ ((__noinline__));
7
short int yb (short int *y) __attribute__ ((__noinline__));
8
 
9
long int xb (long int *y)
10
{
11
  long int xx = *y & 255;
12
  return xx + y[1];
13
}
14
 
15
long int xw (long int *y)
16
{
17
  long int xx = *y & 65535;
18
  return xx + y[1];
19
}
20
 
21
short int yb (short int *y)
22
{
23
  short int xx = *y & 255;
24
  return xx + y[1];
25
}
26
 
27
int main (void)
28
{
29
  long int y[] = {-1, 16000};
30
  short int yw[] = {-1, 16000};
31
 
32
  if (xb (y) != 16255
33
      || xw (y) != 81535
34
      || yb (yw) != 16255)
35
    abort ();
36
  exit (0);
37
}

powered by: WebSVN 2.1.0

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