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/] [980329-1.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
typedef __SIZE_TYPE__ size_t;
2
struct re_pattern_buffer
3
  {
4
    unsigned char *buffer;
5
    unsigned long int used;
6
  };
7
struct re_registers
8
  {
9
    int *start;
10
  };
11
 
12
static const char **regstart, **regend;
13
static const char **old_regend;
14
 
15
static int
16
re_match_2_internal (struct re_pattern_buffer *bufp,
17
                     struct re_registers *regs)
18
{
19
  unsigned char *p = bufp->buffer;
20
  unsigned char *pend = p + bufp->used;
21
 
22
  for (;;)
23
    {
24
      int highest_active_reg = 1;
25
      if (bufp)
26
        {
27
          int i;
28
          for (i = 1;; i++)
29
            regs->start[i] = 0;
30
        }
31
 
32
      switch ((unsigned int) *p++)
33
        {
34
        case 1:
35
          {
36
            unsigned char r = *p;
37
            if (r)
38
              highest_active_reg = r;
39
          }
40
          if (p + 2 == pend)
41
            {
42
              char is_a_jump_n = 0;
43
              int mcnt = 0;
44
              unsigned char *p1;
45
 
46
              p1 = p + 2;
47
              switch (*p1++)
48
                {
49
                case 2:
50
                  is_a_jump_n = 1;
51
                case 1:
52
                  do { do { mcnt = *p1; } while (0); p1 += 2; } while (0);
53
                  if (is_a_jump_n)
54
                    p1 = 0;
55
                }
56
 
57
              if (mcnt && *p1 == 0)
58
                {
59
                  unsigned r;
60
                  for (r = 0; r < (unsigned) *p + (unsigned) *(p + 1); r++)
61
                    {
62
                      if (regend[0] >= regstart[r])
63
                        regend[r] = old_regend[r];
64
                    }
65
                  do { while (0 < highest_active_reg + 1) { } } while (0);
66
                }
67
            }
68
        }
69
    }
70
 
71
  return -1;
72
}

powered by: WebSVN 2.1.0

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