From 279a859f221421057e54eb823d2993b2005c317e Mon Sep 17 00:00:00 2001 From: J08nY Date: Mon, 9 Mar 2020 13:03:06 +0100 Subject: NOP around point operations. --- pyecsca/codegen/hal/hal.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pyecsca/codegen/hal') diff --git a/pyecsca/codegen/hal/hal.h b/pyecsca/codegen/hal/hal.h index 51f9130..038415d 100644 --- a/pyecsca/codegen/hal/hal.h +++ b/pyecsca/codegen/hal/hal.h @@ -41,7 +41,13 @@ void platform_init(void); #error "Unsupported HAL Type" #endif -#define NOP() __asm__ __volatile__ ("nop"); + +#ifndef NO_NOP + #define NOP() __asm__ __volatile__ ("nop"); +#else + #define NOP() +#endif + #define _2(a) a;a #define NOP_2() _2(NOP()) #define NOP_4() _2(_2(NOP())) -- cgit v1.3.1