From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e42f728345b2a43 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-09-16 09:39:46 PST Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!spool.mu.edu!olivea!decwrl!pa.dec.com!bier!neideck From: neideck@bier.enet.dec.com (Burkhard Neidecker-Lutz) Newsgroups: comp.unix.osf.osf1 Subject: Re: Alignment on alpha? Date: 16 Sep 1993 16:07:15 GMT Organization: CEC Karlsruhe Distribution: world Message-ID: <27a2vjINNli6@usenet.pa.dec.com> References: <275gq7INNg9j@zephyr.grace.cri.nz> <2775bo$52b@utne.zk3.dec.com> NNTP-Posting-Host: BIER If you *really* need unaligned access to objects that are misaligned on purpose, you can either write portable code by using byte accesses and assembling into words or the (faster) way is to use an extension to C provided by the Alpha/OSF/1 compilers which will generate the more efficient unaligned access code sequences found in the Alpha architecture: main() { char mis[10]; __unaligned int *p; p = (int *) (mis + 1); return(*p); } Burkhard Neidecker-Lutz Distributed Multimedia Group, CEC Karlsruhe Software Motion Pictures & BERKOM II Project Digital Equipment Corporation neidecker@nestvx.enet.dec.com