gcc

David Rundle (davekern@ihug.co.nz)
Wed, 05 Sep 2001 09:04:01 +1200


hi i need help i have a data struct that matchs some hardwear but
gcc is alignin it this meins it is out of sync whit the hardwear
like
char is 2 bytes
long double is 12 bytes
will thats what gcc thinks

so i need to tell gcc not to align the data struct

may be like

noalign struct ........

the main prob is whit long double st[8]

gcc make long double 12 bytes when it need to be 10 bytes

think you

struct _i386_fpu_st
{
long long significand;
unsigned char exponent ;
/* unsigned long test ; */

} ;

struct _i386_fpu
{
unsigned short control ;
unsigned short rev0 ;
unsigned short status ;
unsigned short rev1 ;
unsigned short tag ;
unsigned short rev2 ;
unsigned long instructionPointer ;
unsigned short instructionSelector ;
unsigned short opcode ;
unsigned long operandPointer ;
unsigned short operandSelector ;
unsigned short rev3 ;
long double st[8] ;

/* struct _i386_fpu_st st[8] ; */

unsigned long rev[400] ;


} ;

extern struct _i386_fpu * i386_fpuInit(void) ;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/