Software APIs
multibits_asm.h
1 // Copyright lowRISC contributors (OpenTitan project).
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #ifndef OPENTITAN_SW_DEVICE_LIB_BASE_MULTIBITS_ASM_H_
6 #define OPENTITAN_SW_DEVICE_LIB_BASE_MULTIBITS_ASM_H_
7 
8 /**
9  * Multi-bit boolean values for use in assembly code.
10  *
11  * Please use `multibits.h` instead when writing C code.
12  */
13 
14 /**
15  * 4-bits boolean values
16  */
17 #define MULTIBIT_ASM_BOOL4_TRUE 0x6
18 #define MULTIBIT_ASM_BOOL4_FALSE 0x9
19 
20 /**
21  * 8-bits boolean values
22  */
23 #define MULTIBIT_ASM_BOOL8_TRUE 0x96
24 #define MULTIBIT_ASM_BOOL8_FALSE 0x69
25 
26 /**
27  * 12-bits boolean values
28  */
29 #define MULTIBIT_ASM_BOOL12_TRUE 0x696
30 #define MULTIBIT_ASM_BOOL12_FALSE 0x969
31 
32 /**
33  * 16-bits boolean values
34  */
35 #define MULTIBIT_ASM_BOOL16_TRUE 0x9696
36 #define MULTIBIT_ASM_BOOL16_FALSE 0x6969
37 
38 /**
39  * 20-bits boolean values
40  */
41 #define MULTIBIT_ASM_BOOL20_TRUE 0x69696
42 #define MULTIBIT_ASM_BOOL20_FALSE 0x96969
43 
44 /**
45  * 24-bits boolean values
46  */
47 #define MULTIBIT_ASM_BOOL24_TRUE 0x969696
48 #define MULTIBIT_ASM_BOOL24_FALSE 0x696969
49 
50 /**
51  * 28-bits boolean values
52  */
53 #define MULTIBIT_ASM_BOOL28_TRUE 0x6969696
54 #define MULTIBIT_ASM_BOOL28_FALSE 0x9696969
55 
56 /**
57  * 32-bits boolean values
58  */
59 #define MULTIBIT_ASM_BOOL32_TRUE 0x96969696
60 #define MULTIBIT_ASM_BOOL32_FALSE 0x69696969
61 
62 #endif // OPENTITAN_SW_DEVICE_LIB_BASE_MULTIBITS_ASM_H_