🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #3456

Re: RISC Machine Data Structure Word Alignment Problems?

#3456
From: Herman Rubin
Date: Tue, 23 Jan 1990 11:43
20 lines
1542 bytes
In article <LJ81OX3ggpc2@ficc.uu.net>, peter@ficc.uu.net (Peter da Silva) writes:
> > I guess all the world's not a Vax any more, now it's a 68020.
> 
> Worse, since non-word-aligned values do cost extra cycles to access, any
> 68020 C compiler that didn't pad that structure is broken. Some "features"
> of CISC processors are just too expensive to use.

Having seen the statement about penalties for unaligned, I tried the following
code (hand coded in assembler to eliminate unnecessary overhead):

.....
while(k < end)*k++ = *i++ ^ *j++;

and the j pointer was deliberately unaligned.  Now this was on a VAX, and it is
possible that other machines may give different results, but the time penalty,
while there, was not excessive.
-- 
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907
Phone: (317)494-6054
hrubin@l.cc.purdue.edu (Internet, bitnet, UUCP)
Technical Details
Message-ID: <1852@l.cc.purdue.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!cica!iuvax!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik
References: <111@melpar.UUCP> <1990Jan21.224826.1699@esegue.segue.boston.ma.us> <LJ81OX3ggpc2@ficc.uu.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!cica!iuvax!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik
From: cik@l.cc.purdue.edu (Herman Rubin)
Newsgroups: comp.arch,comp.lang.c
Subject: Re: RISC Machine Data Structure Word Alignment Problems?
Summary: How expensive in unaligned?
Keywords: risc sun
Message-ID: <1852@l.cc.purdue.edu>
Date: 23 Jan 90 11:43:53 GMT
References: <111@melpar.UUCP> <1990Jan21.224826.1699@esegue.segue.boston.ma.us> <LJ81OX3ggpc2@ficc.uu.net>
Followup-To: comp.arch
Organization: Purdue University Statistics Department
Lines: 20