API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

AEEINTERFACE_ATPCS_PADMEMBERS

Brew Release
Brew MP 1.0.2
Description
This token should be placed in structure declarations before any ATPCS/AAPCS-incompatible 64-bit structure members which are not alignmed at a 64 bit structure boundary. For example:
struct foo { uint8 a; int64 b; uint16 c; int64 d; uint32 e; int64 f; int64 g; }
The above is not ATPCS/AAPCS compatible because b,d and f will be aligned at a 32 bit boundary under ATPCS and 64 bit boundary under AAPCS.
struct foo { uint8 a; AEEINTERFACE_ATPCS_PADMEMBERS(b,7) int64 b; uint16 c; AEEINTERFACE_ATPCS_PADMEMBERS(d,6) int64 d; uint32 e; AEEINTERFACE_ATPCS_PADMEMBERS(f,4) int64 f; int64 g; }
The above is ATPCS/AAPCS compatible because b,d and f will be aligned at 64 bit boundaries for both ATPCS and AAPCS.
Ideally, structures with these kinds of gaps should be avoided.