Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!uunet!mcsun!ukc!edcastle!aiai!richard From: richard@aiai.ed.ac.uk (Richard Tobin) Newsgroups: comp.arch Subject: Re: Is handling off-alignment impor Message-ID: <3200@skye.ed.ac.uk> Date: 14 Aug 90 12:02:38 GMT References: <40711@mips.mips.COM> <3300155@m.cs.uiuc.edu> Reply-To: richard@aiai.UUCP (Richard Tobin) Organization: AIAI, University of Edinburgh, Scotland Lines: 21 In article <3300155@m.cs.uiuc.edu> marick@m.cs.uiuc.edu writes: >In Lucid's Common Lisp, they used the two low-order bits as the tag. >On a machine that simply ignored the low-order bits on dereferencing, >they could avoid masking those bits off. I don't know whether they >did so. It's possible to make use of the fact that most machines *don't* ignore the low-order bits to get "free" type checking. Suppose you make the tag for cons cells 3, and address them something like this: move -3(r1), r0 This will cause a trap if the tag is not 3. Whether the type check is really free depends on whether you would have been able to use a faster addressing mode if you didn't want the check. -- Richard -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin