/* bug-2630.c */ #include #define NUM_CORE_STATES 4 int core_state_transition(unsigned char **instr , unsigned long *transition_count) { static unsigned long i; transition_count; if (i >= NUM_CORE_STATES * 2) **instr=0; return i++ % NUM_CORE_STATES; } unsigned int crcu32(unsigned long newval, unsigned int crc) { return (newval>>16)+crc; } #ifndef __SDCC_pdk14 // Lack of memory unsigned int core_bench_state(unsigned long blksize, unsigned char *memblock, int seed2, int step, unsigned int crc) { unsigned long final_counts[NUM_CORE_STATES]; unsigned long track_counts[NUM_CORE_STATES]; unsigned char *p=memblock; unsigned long i; for (i=0; i