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/] [compile/] [pr42927.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
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
2
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
3
typedef enum { READ_SHARED = 0, WRITE_EXCLUSIVE = 1,
4
    READ_EXCLUSIVE = 2, EXCLUSIVE_ACCESS = 3 } scsires_access_mode;
5
struct scsires_extent_elem {
6
    scsires_access_mode mode;
7
    unsigned relative_address;
8
    u_int32_t first_block;
9
    u_int32_t length;
10
};
11
typedef struct scsires_extent_elem scsires_extent_elem_t;
12
struct scsires_extent {
13
    u_int8_t num_elements;
14
    scsires_extent_elem_t *elements;
15
};
16
typedef struct scsires_extent scsires_extent_t;
17
unsigned char buf[512];
18
void scsires_issue_reservation(scsires_extent_t * new_extent)
19
{
20
  int i;
21
  for (i = 0; i < new_extent->num_elements; i++)
22
    {
23
      buf[(i * 8)] = new_extent->elements[i].mode;
24
      buf[(i * 8) + 1] = ((new_extent->elements[i].length >> 16) & 0xff);
25
      buf[(i * 8) + 2] = ((new_extent->elements[i].length >> 8) & 0xff);
26
      buf[(i * 8) + 3] = (new_extent->elements[i].length & 0xff);
27
      buf[(i * 8) + 4] = ((new_extent->elements[i].first_block >> 24) & 0xff);
28
      buf[(i * 8) + 5] = ((new_extent->elements[i].first_block >> 16) & 0xff);
29
      buf[(i * 8) + 6] = ((new_extent->elements[i].first_block >> 8) & 0xff);
30
      buf[(i * 8) + 7] = (new_extent->elements[i].first_block & 0xff);
31
    }
32
}

powered by: WebSVN 2.1.0

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