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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [lto/] [20090128_0.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-lto-do assemble }
2
// { dg-lto-options {{-fpreprocessed -O2 -flto -flto-partition=1to1 -funsigned-char}} }
3
typedef unsigned char uint8;
4
extern const uint8 array[256];
5
static inline bool
6
g (unsigned char c)
7
{
8
  return array[c] & 0x80;
9
}
10
 
11
class Class1
12
{
13
  static bool f1 (char **dst, const char *end, char c);
14
  static bool f2 (const char *map, const char **src, char **dst,
15
                 const char *end);
16
  static bool f3 (const char *src, char *dst, const char *end);
17
};
18
 
19
enum JTipL
20
{
21
  KXHR8 = 0, KXNU3, KX_HASH, KXYYZ, KXFI9, KXX3, KXAFA, KXV4Z, KXZ11,
22
};
23
 
24
static const char
25
  p9t42[256] = { KXYYZ, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
26
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
27
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
28
      KXX3, KXX3, KXX3, KXX3, KXX3, KXAFA, KXX3, KX_HASH, KXAFA,
29
      KXFI9, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXV4Z, KXAFA, KXAFA,
30
      KXAFA, KXV4Z, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA,
31
      KXAFA, KXAFA, KXAFA, KXAFA, KXHR8, KXX3, KXV4Z, KXX3, KXNU3,
32
      KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA,
33
      KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA,
34
      KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA,
35
      KXX3, KXX3, KXX3, KXX3, KXAFA, KXX3, KXAFA, KXAFA, KXAFA, KXAFA,
36
      KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA,
37
      KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA, KXAFA,
38
      KXAFA, KXAFA, KXAFA, KXAFA, KXX3, KXX3, KXX3, KXAFA, KXX3, KXX3,
39
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
40
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
41
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
42
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
43
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
44
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
45
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
46
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
47
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
48
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
49
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
50
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
51
      KXX3, KXX3, KXX3, KXX3, KXX3, KXX3, KXX3,
52
};
53
 
54
inline bool
55
Class1::f2 (const char *map, const char **src, char **dst,
56
                    const char *end)
57
{
58
  if (g ((*src)[1]) && g ((*src)[2]))
59
    {
60
      char c = (static_cast < unsigned char >((*src)[1])) & 0xf;
61
      if (map[c] == KXAFA)
62
        {
63
        }
64
      else if (f1 (dst, end, c))
65
        {
66
        }
67
    }
68
  return true;
69
}
70
 
71
bool
72
Class1::f3 (const char *src, char *dst, const char *end)
73
{
74
  while (dst < end)
75
    {
76
      char c = *src;
77
      char m = p9t42[c];
78
      switch (m)
79
        {
80
        case KXYYZ:
81
          *dst = '\0';
82
        case KXFI9:
83
          if (!f2 (p9t42, &src, &dst, end))
84
            ;
85
        }
86
    }
87
  return false;
88
}

powered by: WebSVN 2.1.0

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