Skip to content

Commit a5766a3

Browse files
authored
Default Alignment of Locals, Globals and Statics
Update ARM64 ABI documentation with default layout alignment done by Microsoft VC++ for locals, globals and statics based on their size.
1 parent 43f6688 commit a5766a3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/build/arm64-windows-abi-conventions.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,24 @@ Windows running on ARM64 enables the CPU hardware to handle misaligned accesses
4545

4646
However, accesses to uncached (device) memory still must always be aligned. If code could possibly read or write misaligned data from uncached memory, it must make sure to align all accesses.
4747

48+
Default layout alignment for locals:
49+
50+
| Size in bytes | Alignment in bytes |
51+
| - | - |
52+
| 1 | 1 |
53+
| 2 | 2 |
54+
| 3, 4| 4 |
55+
| > 4 | 8 |
56+
57+
Default layout alignment for globals and statics:
58+
59+
| Size in bytes | Alignment in bytes |
60+
| - | - |
61+
| 1 | 1 |
62+
| 2 - 4 | 4 |
63+
| 5 - 63 | 8 |
64+
| >= 64 | 16 |
65+
4866
## Integer registers
4967

5068
The AArch64 architecture supports 32 integer registers:

0 commit comments

Comments
 (0)