CPU2006_Perl_scan_vstring.c

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:23.0
disk size 558 Bytes
downloadable true
type
attribute value
name no_type
processor id 1
description this is the default benchmark type for rejected benchmarks and benchmarks that are not associated with a type.
owning community none
loading contents
//taken from SPEC CPU2006	perlbench/src/toke.c 	Perl_scan_vstring

int nondet();

//O(n)
void
Perl_scan_vstring(int s, int PL_bufend)
{
    int pos = s;
    int start = s;
    if (nondet()) pos++;  /* get past 'v' */
    while (pos < PL_bufend && nondet())
	pos++;

    if (nondet()) {

	if (nondet()) s++;  /* get past 'v' */

	for (;;) {
	    {
		int end = pos;
		while (--end >= s) {
		}
	    }
	    if (pos + 1 < PL_bufend && nondet())
		 s = ++pos;
	    else {
		 s = pos;
		 break;
	    }
	    while (pos < PL_bufend && nondet())
		 pos++;
	}
    }
}

popout

content may be truncated. 'popout' for larger text window.

actions get anonymous link download benchmark