Skip to content

Commit 0cf65a2

Browse files
[docs] Add table for size of builtin types
1 parent ac09418 commit 0cf65a2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/design.md

+22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Design
22

3+
## Builtin Types
4+
5+
| **Type** | AVR | MSP430 | ARM32 Thumb | Unix ARM64 | Win ARM64 | Unix X64 | Win X64 | WebAssembly |
6+
| :------------------: | :-: | :----: | :---------: | :--------: | :-------: | :------: | :-----: | :---------: |
7+
| `unsigned char` | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
8+
| `unsigned short` | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
9+
| `unsigned int` | 2 | 2 | 4 | 4 | 4 | 4 | 4 | 4 |
10+
| `unsigned long` | 4 | 4 | 4 | 8 | 4 | 8 | 4 | 4 |
11+
| `unsigned long long` | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 |
12+
| `float` | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 |
13+
| `double` | 4 | 8 | 8 | 8 | 8 | 8 | 8 | 8 |
14+
| `long double` | 8 | 8 | 8 | 16 | 8 | 16 | 8 | 8 |
15+
| `char` | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
16+
| `wchar_t` | 2 | 4 | 4 | 4 | 2 | 4 | 2 | 4 |
17+
| `char8_t` | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
18+
| `char16_t` | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
19+
| `char32_t` | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 |
20+
21+
### AVR
22+
23+
Size of `double` and `long double` can be changed with `-mdouble=bits` and `-mlong-double=bits`. Possible values are `32` and `64`.
24+
325
## Issues
426

527
### Forced to use namesapce std

0 commit comments

Comments
 (0)