diff --git a/include/fp_util/feature_detect.h b/include/fp_util/feature_detect.h new file mode 100644 index 0000000..dd6c842 --- /dev/null +++ b/include/fp_util/feature_detect.h @@ -0,0 +1,18 @@ +/** +* Author: Lukas +* Created: 18/11/2023. +**/ + +#ifndef FEATURE_DETECT_H +#define FEATURE_DETECT_H + +namespace fp_util { + + __attribute__((feature_variable("__VARA__DETECT__"))) void detect() { + long counter = 0; + asm volatile("" : "+g"(counter) : :); + counter++; + } +} + +#endif //FEATURE_DETECT_H