/******************************************************************************** * File: Step3.c * * Description: This microbenchmark answers the question: * Is there a global component that uses * at least 2 bits of global history? * (if previous steps detected a local component) * * Date: April 2002 * * Author: M.Milenkovic - milena@computer.org **********************************************************************************/ #define L1 5 /* pattern length */ #define L2 2 /* pattern length */ void main(void) { int long unsigned i; /* loop index */ int a,b,c; /* variables with conditional assignment*/ int long unsigned liter = 10000000; /* number of iterations */ for (i=1;i<=liter;++i) { if ((i%L1) == 0) a=1; else a=0; if ((i%L2) == 0) b=1; else b=0; if ( (a*b) == 1) c=1; /* spy branch */ } }