* gcc
@ 2001-09-04 21:04 David Rundle
2001-09-04 22:08 ` gcc Kurt Garloff
0 siblings, 1 reply; 2+ messages in thread
From: David Rundle @ 2001-09-04 21:04 UTC (permalink / raw)
To: kernel list
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) ;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gcc
2001-09-04 21:04 gcc David Rundle
@ 2001-09-04 22:08 ` Kurt Garloff
0 siblings, 0 replies; 2+ messages in thread
From: Kurt Garloff @ 2001-09-04 22:08 UTC (permalink / raw)
To: David Rundle; +Cc: kernel list
[-- Attachment #1: Type: text/plain, Size: 720 bytes --]
On Wed, Sep 05, 2001 at 09:04:01AM +1200, David Rundle wrote:
> 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
__attribute__((packed))
Regards,
--
Kurt Garloff <kurt@garloff.de> [Eindhoven, NL]
Physics: Plasma simulations <K.Garloff@Phys.TUE.NL> [TU Eindhoven, NL]
Linux: SCSI, Security <garloff@suse.de> [SuSE Nuernberg, DE]
(See mail header or public key servers for PGP2 and GPG public keys.)
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-09-04 22:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-04 21:04 gcc David Rundle
2001-09-04 22:08 ` gcc Kurt Garloff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox