Skip to content

Conversation

tshortli
Copy link
Contributor

AvailabilityDomain is a pointer union over CustomAvailabilityDomain and an opaque pointer-like 24-bit value, which means the number of spare bits in an AvailabilityDomain representation is one fewer than a CustomAvailabilityDomain pointer. Other structures in the compiler rely on there being at least 2 spare bits in AvailabilityDomain, though, which was not the case when building for a 32 bit architecture. To ensure there are enough spare bits, always align CustomAvailabilityDomain to 8 bytes, the same as many AST data structures.

`AvailabilityDomain` is a pointer union over `CustomAvailabilityDomain` and an
opaque pointer-like 24-bit value, which means the number of spare bits in an
`AvailabilityDomain` representation is one fewer than a
`CustomAvailabilityDomain` pointer. Other structures in the compiler rely on
there being at least 2 spare bits in `AvailabilityDomain`, though, which was
not the case when building for a 32 bit architecture. To ensure there are
enough spare bits, always align `CustomAvailabilityDomain` to 8 bytes, the same
as many AST data structures.
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli tshortli enabled auto-merge September 26, 2025 05:51
@tshortli tshortli changed the title AST: Give CustomAvailabilityDomain 8 byte alignment. AST: Give CustomAvailabilityDomain 8 byte alignment Sep 26, 2025
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test Windows

@tshortli tshortli merged commit 6cb3181 into swiftlang:main Sep 26, 2025
3 checks passed
@tshortli tshortli deleted the fix-compiler-armv7-build branch September 26, 2025 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant