Lightweight Cryptography Primitives
 All Data Structures Files Functions Variables Typedefs Macros Pages
drygascon128_arm_selector.h
1 #ifndef __DRYGASCON_ARM_SELECTOR_H__
2 #define __DRYGASCON_ARM_SELECTOR_H__
3 /*Optional file to select the best implementation for each chip*/
4 
5 #ifdef STM32H743xx
6  #define __DRYGASCON_ARM_SELECTOR_V7M_FPU__
7  #define __DRYGASCON_ARM_SELECTOR_FOUND__
8 #endif
9 
10 #ifdef STM32F746xx
11  #define __DRYGASCON_ARM_SELECTOR_V7M_FPU__
12  #define __DRYGASCON_ARM_SELECTOR_FOUND__
13 #endif
14 
15 #ifdef STM32F411xx
16  #define __DRYGASCON_ARM_SELECTOR_V7M_FPU__
17  #define __DRYGASCON_ARM_SELECTOR_FOUND__
18 #endif
19 
20 #ifdef STM32L552xx /*technically it is V8M but we don't have a specific code for that one*/
21  #define __DRYGASCON_ARM_SELECTOR_V7M__
22  #define __DRYGASCON_ARM_SELECTOR_FOUND__
23 #endif
24 
25 #ifdef STM32F103xx
26  #define __DRYGASCON_ARM_SELECTOR_V7M__
27  #define __DRYGASCON_ARM_SELECTOR_FOUND__
28 #endif
29 
30 #ifdef STM32L011xx
31  #define __DRYGASCON_ARM_SELECTOR_V6M__
32  #define __DRYGASCON_ARM_SELECTOR_FOUND__
33 #endif
34 
35 #ifdef __SAM3X8E__
36  #define __DRYGASCON_ARM_SELECTOR_V7M__
37  #define __DRYGASCON_ARM_SELECTOR_FOUND__
38 #endif
39 
40 /*TODO: add more chips here*/
41 
42 #ifndef __DRYGASCON_ARM_SELECTOR_FOUND__
43  /*more generic defines catching whole families*/
44  #if defined(STM32F4xx) || defined(STM32F7xx) || defined(STM32H7xx)
45  #define __DRYGASCON_ARM_SELECTOR_V7M_FPU__
46  #define __DRYGASCON_ARM_SELECTOR_FOUND__
47  #endif
48 
49  #if defined(STM32F1xx)
50  #define __DRYGASCON_ARM_SELECTOR_V7M__
51  #define __DRYGASCON_ARM_SELECTOR_FOUND__
52  #endif
53 #endif
54 
55 #ifdef __DRYGASCON_ARM_SELECTOR_V7M_FPU__
56  #define DRYGASCON_G_OPT drygascon128_g_v7m_fpu
57  #define DRYGASCON_F_OPT drygascon128_f_v7m_fpu
58  #define DRYGASCON_G0_OPT drygascon128_g0_v7m_fpu
59 #endif
60 
61 #ifdef __DRYGASCON_ARM_SELECTOR_V7M_FPU_X__
62  #define DRYGASCON_G_OPT drygascon128_g_v7m_fpu_x
63  #define DRYGASCON_F_OPT drygascon128_f_v7m_fpu_x
64  #define DRYGASCON_G0_OPT drygascon128_g0_v7m_fpu_x
65 #endif
66 
67 #ifdef __DRYGASCON_ARM_SELECTOR_V7M__
68  #define DRYGASCON_G_OPT drygascon128_g_v7m
69  #define DRYGASCON_F_OPT drygascon128_f_v7m
70  #define DRYGASCON_G0_OPT drygascon128_g0_v7m
71 #endif
72 
73 #ifdef __DRYGASCON_ARM_SELECTOR_V6M__
74  #define DRYGASCON_G_OPT drygascon128_g_v6m
75  #define DRYGASCON_F_OPT drygascon128_f_v6m
76  /*#define DRYGASCON_G0_OPT drygascon128_g0_v6m*/
77  #define DRYGASCON_ALIGN_INPUT_32
78 #endif
79 
80 #endif