Alpha VM on Solaris UltraSPARC?
Nick Forde
nickf at system-7.freeserve.co.uk
Mon Mar 14 12:20:48 PST 2005
I investigated this problem a bit more and found the following
thread which suggests why -mno-fastest-structs is being ignored.
http://gcc.gnu.org/ml/gcc/2003-08/msg01043.html
Using the GCC packed attribute as follows will force the compiler to
do the right thing and -O2 works OK. The whole struct could be
flagged BYTE_ALIGNED but this seems a bit cautious given the
potential performance implications.
Nick.
#define BYTE_ALIGNED __attribute__ ((packed))
struct MethodDefinition
{
struct ObjectHeader header;
struct Map * map;
ObjectPointer traits;
ObjectPointer method;
ObjectPointer slotAccessor;
unsigned long int dispatchPositions;
unsigned long long int dispatchID BYTE_ALIGNED;
unsigned long int foundPositions;
unsigned long int dispatchRank;
};
struct Map
{
struct ObjectHeader header;
struct Map * map;
ObjectPointer traits;
ObjectPointer flags;
ObjectPointer representative;
ObjectPointer numDelegates;
ObjectPointer numSlots;
struct SlotTable * slotTable;
struct RoleTable * roleTable;
unsigned long int visitedPositions;
unsigned long long int dispatchID BYTE_ALIGNED;
};
More information about the Slate
mailing list