mirror of
https://github.com/Interlisp/maiko.git
synced 2026-02-18 21:37:21 +00:00
Addr68k_from_LADDR always produced a 2-byte aligned pointer which was frequently cast to a type requiring 4-byte alignment. This commit changes Addr68k_from_LADDR uses to one of two new inline procedures, NativeAligned2FromLAddr or NativeAligned4FromLAddr, which produce a result with the appropriate alignment for the context. This permits checking for cases where the Lisp address is not appropriately aligned for the usage context, and localizes compiler warnings to these two procedures. Similarly, the Addr68k_from_StkOffset macros are replaced by NativeAligned2FromStackOffset and NativeAligned4FromStackOffset. NativeAligned4FromLPage replaces Addr68k_from_LPAGE as page address will always be at least 4-byte aligned. LAddrFromNative, LPageFromNative, and StackOffsetFromNative complete the set, replacing LADDR_from_68k, LPAGE_from_68k, and StkOffset_from_68K (note K not k) respectively.
3.0 KiB
3.0 KiB