Problem: 1382173
Title: (Alignment) some structs need #pragma align=mac68K
Received: Aug 26 1996 10:38AM
There are several bugs involving PowerPC alignment in MacApp 3.3.1. We have
chosen to switch our MetroWerks CodeWarrior 9 projects to use PowerPC
alignment. We decided to make this move, because the PowerPC-version can be
a lot faster if it uses PowerPC aligned data structures.
Since we have to maintain data compatibility between PowerPC and 68K files,
we choose to switch both (68K and PowerPC) projects to use PowerPC
alignment. We had to do this since we read and write structs to and from
our files.
When we switched the PowerPC projects to use PowerPC alignment, we found
some structs in MacApp which were emulating toolbox structures or
redeclaring resTypes, but were not enclosed with #pragma align=mac68K. When
we switched the 68K projects to use PowerPC alignment, we found some
additional cases which were dealing with code resources, jump tables and
trap patches.
Below you will find a list of files and data structures which we had to
bracket with #pragma align=mac68K.
For PPC & PowerPC alignment:
- UErrorMgr.cp struct ErrRecord
- UErrorMgr.cp union Converter
- UMenuMgr.cp struct MenuCmdRecord
- UMenuMgr.cp struct MenuIDRecord
- UPopup.cp struct popupPrivateData
- UTheDebugger.cp struct T_cl_Sort
For 68K & PowerPC alignment:
- UPatch.h struct CallBack
- UPatch.h struct JmpInstructionTemplate
- USegments.cp struct ModelFarCodeHeader
- UVUAssist.h was using #if qPowerPC instead of #if PRAGMA_ALIGN_SUPPORTED to check whether to use 68K alignment, or not. We changed all #if qPowerPC to #if PRAGMA_ALIGN_SUPPORTED
Fix:
Fixed.