1/* 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 8unsigned char TIFFFax2DMode[20][256]; 9unsigned char TIFFFax2DNextState[20][256]; 10unsigned char TIFFFaxUncompAction[20][256]; 11unsigned char TIFFFaxUncompNextState[20][256]; 12unsigned char TIFFFax1DAction[230][256]; 13unsigned char TIFFFax1DNextState[230][256]; 14 15typedef struct tableentry { 16 unsigned short length; 17 unsigned short code; 18 short runlen; 19} tableentry; 20 21extern tableentry TIFFFaxWhiteCodes[]; 22extern tableentry TIFFFaxBlackCodes[]; 23 24static short sp_data, sp_bit; 25 26static unsigned char 27fetchByte (inbuf) 28 29unsigned char **inbuf; 30 31{ 32 unsigned char byte = **inbuf; 33 (*inbuf)++; 34 return (byte); 35} 36 37static int 38decode_white_run (inbuf) 39 40unsigned 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 71