From a7d3589c4ba3551ab614dfc9c931c5998fbf7fac Mon Sep 17 00:00:00 2001 From: J08nY Date: Mon, 9 Mar 2020 12:44:03 +0100 Subject: Add inversion to config, change scalar mult command. --- pyecsca/codegen/hal/hal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pyecsca/codegen/hal') diff --git a/pyecsca/codegen/hal/hal.h b/pyecsca/codegen/hal/hal.h index fc7fc37..51f9130 100644 --- a/pyecsca/codegen/hal/hal.h +++ b/pyecsca/codegen/hal/hal.h @@ -41,4 +41,16 @@ void platform_init(void); #error "Unsupported HAL Type" #endif +#define NOP() __asm__ __volatile__ ("nop"); +#define _2(a) a;a +#define NOP_2() _2(NOP()) +#define NOP_4() _2(_2(NOP())) +#define NOP_8() _2(_2(_2(NOP()))) +#define NOP_16() _2(_2(_2(_2(NOP())))) +#define NOP_32() _2(_2(_2(_2(_2(NOP()))))) +#define NOP_64() _2(_2(_2(_2(_2(_2(NOP())))))) +#define NOP_128() _2(_2(_2(_2(_2(_2(_2(NOP()))))))) +#define NOP_256() _2(_2(_2(_2(_2(_2(_2(_2(NOP())))))))) +#define NOP_512() _2(_2(_2(_2(_2(_2(_2(_2(_2(NOP()))))))))) + #endif //HAL_H_ -- cgit v1.3.1