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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [980506-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* The arrays are too large for the xstormy16 - won't fit in 16 bits. */
2
/* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
3
/* { dg-do assemble { xfail xstormy16-*-* m6811-*-* m6812-*-* } } */
4
/* { dg-require-effective-target size32plus } */
5
 
6
unsigned char   TIFFFax2DMode[20][256];
7
unsigned char   TIFFFax2DNextState[20][256];
8
unsigned char   TIFFFaxUncompAction[20][256];
9
unsigned char   TIFFFaxUncompNextState[20][256];
10
unsigned char   TIFFFax1DAction[230][256];
11
unsigned char   TIFFFax1DNextState[230][256];
12
 
13
typedef struct tableentry {
14
    unsigned short length;
15
    unsigned short code;
16
    short       runlen;
17
} tableentry;
18
 
19
extern tableentry TIFFFaxWhiteCodes[];
20
extern tableentry TIFFFaxBlackCodes[];
21
 
22
static short sp_data, sp_bit;
23
 
24
static unsigned char
25
fetchByte (inbuf)
26
 
27
unsigned char **inbuf;
28
 
29
{
30
    unsigned char byte = **inbuf;
31
    (*inbuf)++;
32
    return (byte);
33
}
34
 
35
static int
36
decode_white_run (inbuf)
37
 
38
unsigned char **inbuf;
39
 
40
{
41
    short state = sp_bit;
42
    short action;
43
    int runlen = 0;
44
 
45
    for (;;)
46
    {
47
        if (sp_bit == 0)
48
        {
49
        nextbyte:
50
            sp_data = fetchByte (inbuf);
51
        }
52
 
53
        action = TIFFFax1DAction[state][sp_data];
54
        state = TIFFFax1DNextState[state][sp_data];
55
        if (action == 0 )
56
            goto nextbyte;
57
        if (action == 1 )
58
            return (-1 );
59
        if (action == 210 )
60
            return (-3 );
61
        sp_bit = state;
62
        action = (TIFFFaxWhiteCodes[ action - 2  ].runlen) ;
63
        runlen += action;
64
        if (action < 64)
65
            return (runlen);
66
    }
67
}
68
 

powered by: WebSVN 2.1.0

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