Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Apr 1999 22:52:12 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        obrien@NUXI.com
Cc:        paul@originative.co.uk, gallatin@cs.duke.edu, mjacob@feral.com, mike@smith.net.au, alpha@FreeBSD.ORG
Subject:   Re: egcs ready for alpha?
Message-ID:  <199904172252.PAA22325@usr08.primenet.com>
In-Reply-To: <19990416164206.A69424@nuxi.com> from "David O'Brien" at Apr 16, 99 04:42:06 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > >  > +#if 0
> > >  >  	*(union u_spcl *)(*(nextblock)++) = *(union u_spcl *)dp;
> 
> It might be better to remove the cast of nextblock and dp and see what
> warnings EGCS gives.  The ficl and vinum code had weird union casts that
> had to be reworked for egcs.  In the above, I bet there is an alignment
> issue wth EGCS using a different alightment rule than gcc did.

Specifically, I think it would work with a #pragma pack(4); I believe
the default structure packing on Alpha for EGCS is 8.

In general, when you are using a structure whose data is externalized,
and you want it to be portable, you should either serialize it (XDR
the data into a character buffor on the way in and out), or you should
use a #pragma pack(1).

There are a number of problems with this on the Alpha, since the Alpha
does not like unaligned data accesses.  Unfortuantely, a recent commit
put a fault handler in that does fixups on unaligned accesses, and the
damn this is defaulted to "on", which does a fat lot of good for getting
these problems *resolved* instead of *masked*.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904172252.PAA22325>