X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=support%2Ftests%2Fdhrystone%2Fdhry.c;h=52cdb647b2335ecafc98ccf7e4cab59906b8eaa9;hb=12a13c467cb444adb9317ffca8f4899f5076de3f;hp=1bb6d546fb2b920d8024874759725d238e487688;hpb=59176244d45b896b8212ce19c1c438eeafd29478;p=fw%2Fsdcc diff --git a/support/tests/dhrystone/dhry.c b/support/tests/dhrystone/dhry.c index 1bb6d546..52cdb647 100644 --- a/support/tests/dhrystone/dhry.c +++ b/support/tests/dhrystone/dhry.c @@ -52,28 +52,18 @@ #include #define clock() ClockTicks() #define CLOCKS_PER_SEC 1000 -#undef PRINT_T_STATES #define memcpy(d,s,l) memcpyx(d,s,l) -#elif defined(__z80) +#elif defined(__z80) || defined(__gbz80) unsigned int _clock(void); #define clock _clock #define CLOCKS_PER_SEC 100 -#define PRINT_T_STATES 1 #else /** For clock() */ #include #include -#define PRINT_T_STATES -#endif - -/** Print the number of t-states this program has been executing for. - Optional :) -*/ -#ifdef PRINT_T_STATES -void _printTStates(void); #endif /** Set to one to print more messages about expected values etc. @@ -98,6 +88,10 @@ int Arr_2_Glob [50] [50]; /* Used instead of malloc() */ static Rec_Type _r[2]; +void mark(void) +{ +} + void Proc_1 (REG Rec_Pointer Ptr_Val_Par); void Proc_2 (One_Fifty *Int_Par_Ref); void Proc_5 (void); @@ -226,10 +220,6 @@ int main(void) DPRINTF(("Looping.\n")); } /* loop "for Run_Index" */ -#ifdef PRINT_T_STATES - _printTStates(); -#endif - printf("Run_Index = %d\n", Run_Index); runTime = clock() - runTime; @@ -292,6 +282,7 @@ int main(void) #endif #if 1 printf("Number of runs: %u. runTime: %u.\n", Number_Of_Runs, (unsigned)runTime); + mark(); printf("Dhrystones/s = %u\n", (unsigned)((unsigned long)Number_Of_Runs / (runTime/CLOCKS_PER_SEC))); printf("MIPS = d/s/1757 = (sigh, need floats...)\n"); #endif