diff --git a/.gitignore b/.gitignore index c5e82fe0..5f04304d 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ pkg *.o log tmp +a.out diff --git a/test/bench/divc.c b/stash/constant_div_generator.c similarity index 98% rename from test/bench/divc.c rename to stash/constant_div_generator.c index 4bf4929c..1b3f545b 100644 --- a/test/bench/divc.c +++ b/stash/constant_div_generator.c @@ -16,7 +16,7 @@ typedef unsigned int uint; -uint log2( uint n ) +uint log2uni( uint n ) { uint bit, pow, logn; @@ -92,8 +92,8 @@ void divideby2( uint type, uint n, uint lsb, uint msb ) uint logmsb; uint usinga4; - loglsb = log2( lsb ); - logmsb = log2( msb ); + loglsb = log2uni( lsb ); + logmsb = log2uni( msb ); printf( "; %s [%s]\n\n", BANNER, DATE ); printf( "\tAREA |div%d$code|, CODE, READONLY\n\n", n ); diff --git a/test/bench/fibo.c b/test/bench/fibo.c index 0a8c515d..352adfc4 100644 --- a/test/bench/fibo.c +++ b/test/bench/fibo.c @@ -19,11 +19,11 @@ int main(void) { int counter = 1000000; int counter2 = counter; - int level = 76; + int level = 40; int fib ; - while(counter--) { + while(counter--) { fib = fibo(level); } printf("%i times fib %d \n",counter2 , level); - + } diff --git a/test/bench/hello.c b/test/bench/hello.c new file mode 100644 index 00000000..35a9d49c --- /dev/null +++ b/test/bench/hello.c @@ -0,0 +1,9 @@ +#include + +int main(void) +{ + int counter = 1000000; + while(counter--) { + printf("Hello there\n"); + } +} diff --git a/test/bench/hello0.c b/test/bench/hello0.c new file mode 100644 index 00000000..35a9d49c --- /dev/null +++ b/test/bench/hello0.c @@ -0,0 +1,9 @@ +#include + +int main(void) +{ + int counter = 1000000; + while(counter--) { + printf("Hello there\n"); + } +} diff --git a/test/bench/null.c b/test/bench/null.c new file mode 100644 index 00000000..85a94047 --- /dev/null +++ b/test/bench/null.c @@ -0,0 +1,6 @@ +#include + +int main(void) +{ + return 1; +} diff --git a/test/bench/puti.c b/test/bench/puti.c new file mode 100644 index 00000000..f3eea358 --- /dev/null +++ b/test/bench/puti.c @@ -0,0 +1,9 @@ +#include + +int main(void) +{ + int counter = 1000000; + while(counter--) { + printf("%i\n" , counter); + } +}