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

powered by: WebSVN 2.1.0

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