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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr47381-1.c] - Blame information for rev 713

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2" } */
3
 
4
typedef unsigned IPos;
5
typedef unsigned char uch;
6
extern uch window[];
7
unsigned max_chain_length;
8
unsigned strstart;
9
int longest_match(IPos cur_match, int len, int best_len)
10
{
11
    unsigned chain_length = max_chain_length;
12
    register uch *scan = window + strstart;
13
    register uch *match;
14
    register uch scan_end1 = scan[best_len-1];
15
    register uch scan_end = scan[best_len];
16
    do {
17
        ;
18
        match = window + cur_match;
19
        if (match[best_len] != scan_end ||
20
            match[best_len-1] != scan_end1 ||
21
            *match != *scan ||
22
            *++match != scan[1]) continue;
23
            best_len = len;
24
    } while ( --chain_length != 0);
25
    return best_len;
26
}

powered by: WebSVN 2.1.0

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