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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20051110-2.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 297 jeremybenn
void add_unwind_adjustsp (long);
2
void abort (void);
3
 
4
unsigned char bytes[5];
5
 
6
int flag;
7
 
8
void
9
add_unwind_adjustsp (long offset)
10
{
11
  int n;
12
  unsigned long o;
13
 
14
  o = (long) ((offset - 0x204) >> 2);
15
 
16
  n = 0;
17
  do
18
    {
19
a:
20
      bytes[n] = o & 0x7f;
21
      o >>= 7;
22
      if (o)
23
        {
24
          bytes[n] |= 0x80;
25
          if (flag)
26
            goto a;
27
        }
28
      n++;
29
    }
30
  while (o);
31
}
32
 
33
int main(void)
34
{
35
  add_unwind_adjustsp (4132);
36
  if (bytes[0] != 0x88 || bytes[1] != 0x07)
37
    abort ();
38
  return 0;
39
}

powered by: WebSVN 2.1.0

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