Lines Matching refs:bit

10 …e oriented to devices that have MCU processors such as ARM Cortex-M and 32-bit RISC-V. These devic…
11 2. Small system: a device oriented to devices that have application processors such as 64-bit ARM C…
12 3. Standard system: a device oriented to devices that have application processors such as 64-bit AR…
14bit devices. For easier code portability, clear coding specifications are necessary. This document…
24 Most 32-bit OSs use ILP32, which defines int, long, and pointer as 32 bits. Most 64-bit OSs use LP6…
75 On a 32-bit OS, the pointer length is 4, **Foo** is 4-byte aligned, and **sizeof(Foo)** is 8. On a …
77 ##### Alignment of the data structure that contains a 64-bit integer
86 … is different due to alignment. On a 32-bit OS, **Foo** is 4-byte aligned, and **sizeof(Foo)** is …
98 #### [Rule] Follow this coding guide to write code that is applicable to both 32- and 64-bit OSs.
100 [Description] OpenHarmony will run in both 32- and 64-bit environments for a long time. To ensure c…
106 [Description] Data types with variable lengths may cause incompatibility issues on 32- and 64-bit O…
123 … **8** | %zu | Used for pointer storage. Different lengths are defined for 32- and 64-bit OSs.|
154 …h as long, int, short, and size_t have different lengths in the 32- and 64-bit environments. This …
162 // This data type is 4-byte long on a 32-bit OS and 8-byte long on a 64-bit OS. You are advised to …
169 For non-ANSI character sequences involving 8-bit encoding, char is recommended. In C++, wchar can b…
199bit OS because the expression (i + k) is an unsigned 32-bit expression. When it is converted to th…
201 #### [Rule] Use 64-bit compatible macros, such as %PRId64, %PRIu64, and %PRIx64, to print 64-bit in…
203 [Description] If the data to be formatted is of the 64-bit type (defined as uint64_t), format the o…
218 The preceding code can output 64-bit numbers in both 32- and 64-bit environments. If other formatti…
231 # Build on a 32-bit OS
236 # Build on a 64-bit OS
243 …Description] On a 32-bit OS, the maximum length of the pointer and size_t is 8 bits (hexadecimal) …
245 …the suffix U to indicate the unsigned int type and the suffix LL/ULL to indicate the 64-bit length.
247 …nge on 32- and 64-bit OSs. Therefore, use LL/ULL as the suffix to ensure that the length is fixed …
263 …d. The compiler uses LL by default or considers the value invalid. On a 64-bit OS, the type is fix…
267 …a constant with the L or UL suffix has different lengths in the 32- and 64-bit environments. This …
272 …ing definition is meaningless. It causes an error on a 32-bit OS and is unnecessary on a 64-bit OS.
300bit OSs, since the 32-bit OS has the signed and unsigned types. Especially, if the most significan…
317 // On a 32-bit OS, n is a negative number.
319 // On a 64-bit OS, n is a positive number. The actual value is 0x00000000FFFFFFFF.
333 On a 64-bit OS, 8-byte alignment is used by default. Using **sizeof()** to obtain the structure len…
335 Pay attention to the length differences on 32- and 64-bit OSs to avoid length calculation errors. C…
349 #### [Rec] In special cases, force the compiler to use a specific alignment mode on the 64-bit OS.
365 …referred. Do not use 8-byte alignment or 64-bit data types to avoid errors during communication wi…
375bit environments. Therefore, the size of each member cannot be used as the offset. A 32-bit OS doe…
388 …set of member b is equal to sizeof(a) + sizeof(p) on a 32-bit OS. This is not true on a 64-bit OS.…
418bit OSs. On a 32-bit OS, there is no padding between member structures of the **TreeNode** structu…
422 …y reduces the invalid space of the structure. You are advised to define 64-bit data types such as …
446 …use explicit type conversion to avoid result inconsistency between the 32- and 64-bit environments.
450 1. When the value of a 64-bit variable is assigned to a 32-bit variable, the values of the least si…
452bit variable is assigned to a 64-bit variable, sign extension is performed based on whether the 32…
469 … is a 32-bit number, and t2 is a 64-bit number. Before the calculation, t1 is extended to 64 bits.…
481 t1 is a 64-bit int64_t type, which is 0xffffffffffffffff in binary mode. When this value is assigne…
483 [Example] Conversion from 32-bit to unsigned 64-bit
493bit number, which must be extended with signs. The most significant bits of the negative number ar…
528 [Description] The variable-length type cannot be forcibly converted to the 32-bit type.
538 #### [Rule] When a large array or large `for` loop index is used on a 64-bit OS, the index type mus…
540 …or large loop is used on a 64-bit OS, the index range may exceed 32 bits. In this case, the variab…
550 On a 64-bit OS, int64_t is a 64-bit type, and count is a large number. unsigned int is a 32-bit typ…
554 …variables based on bit fields, fully consider the basic types and alignment of bit fields to avoid…
556bit field and alignment. The structure length is different in different environments. Use the name…
558 #### [Rule] On a 64-bit OS, consider the length difference caused by the shift operation and the pr…
560 …ation, check whether overflow and rewind occur. Change the data type to 32-bit to avoid result inc…
568 The maximum value of a is 32 on a 32-bit OS and 64 on a 64-bit OS. If a is a 32-bit variable, the e…
572 #### [Rule] The third-party class libraries used by a 64-bit OS must support 64-bit.
574bit. You must evaluate all involved code to ensure that it can run in the 64-bit environment. Some…
576 …ple] In the 32-bit environment, **mmap** can be used. If the size of the memory to map exceeds 2 G…
578 …ctionalities involving bottom-layer assembly must be debugged separately on the 32- and 64-bit OSs.
580bit width of registers are different in the 32- and 64-bit environments. The debugging functionali…
582 …e call stack, you must write and debug the assembly code in the 32- and 64-bit environment separat…
584 #### [Rule] The patch functionality must support both 32- and 64-bit instructions.
588 #### [Rule] All tools used on a 64-bit OS must support 64-bit.