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-1.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
void
7
add_unwind_adjustsp (long offset)
8
{
9
  int n;
10
  unsigned long o;
11
 
12
  o = (long) ((offset - 0x204) >> 2);
13
 
14
  n = 0;
15
  while (o)
16
    {
17
      bytes[n] = o & 0x7f;
18
      o >>= 7;
19
      if (o)
20
        bytes[n] |= 0x80;
21
      n++;
22
    }
23
}
24
 
25
int main(void)
26
{
27
  add_unwind_adjustsp (4132);
28
  if (bytes[0] != 0x88 || bytes[1] != 0x07)
29
    abort ();
30
  return 0;
31
}

powered by: WebSVN 2.1.0

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