diff --git a/regressions/Makefile b/regressions/Makefile index 3195e52..6b369a8 100644 --- a/regressions/Makefile +++ b/regressions/Makefile @@ -4,6 +4,7 @@ DIR=array \ bitmap \ brlock \ bytelock \ + cc \ cohort \ epoch \ fifo \ @@ -27,6 +28,7 @@ DIR=array \ all: $(MAKE) -C ./ck_array/validate all + $(MAKE) -C ./ck_cc/validate all $(MAKE) -C ./ck_cohort/validate all $(MAKE) -C ./ck_cohort/benchmark all $(MAKE) -C ./ck_bitmap/validate all @@ -72,6 +74,7 @@ all: clean: $(MAKE) -C ./ck_array/validate clean + $(MAKE) -C ./ck_cc/validate clean $(MAKE) -C ./ck_pflock/validate clean $(MAKE) -C ./ck_pflock/benchmark clean $(MAKE) -C ./ck_tflock/validate clean diff --git a/regressions/ck_cc/validate/ck_cc.c b/regressions/ck_cc/validate/ck_cc.c new file mode 100644 index 0000000..b9035ea --- /dev/null +++ b/regressions/ck_cc/validate/ck_cc.c @@ -0,0 +1,18 @@ +#include +#include + +#include "../../common.h" + +int +main(void) +{ + unsigned int x; + + ck_pr_store_uint(&x, 4); + + printf(" ffs = %d\n", ck_cc_ffs(x)); + printf(" clz = %d\n", ck_cc_clz(x)); + printf(" ctz = %d\n", ck_cc_ctz(x)); + printf("popcount = %d\n", ck_cc_popcount(x)); + return 0; +}