Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!charon!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.arch Subject: Re: MIPS, Compaq and Microsoft in bed - NYT story Message-ID: <2935@charon.cwi.nl> Date: 14 Feb 91 02:27:20 GMT References: <45758@mips.mips.COM> <3188@crdos1.crd.ge.COM> <5974@labtam.labtam.oz> Sender: news@cwi.nl Organization: CWI, Amsterdam Lines: 17 In article <5974@labtam.labtam.oz> graeme@labtam.labtam.oz (Graeme Gill) writes: > In article <3188@crdos1.crd.ge.COM>, davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) writes: > > > > Since all you can portable do in C is add or subtract ints and etc. > Just a small point, but a lot of these machines have memory alignment > restrictions. How do you ensure address alignment if you can't do an > AND on an address ? The talk was about portable. To get address alignment for an int on a Cray for instance you do: a = (int *)((int)a & 0x1fffffffffffffff); is that portable? To see some real hacks about attempts to get address alignment, look at the code for the Bourne Shell, and be amazed that it works on so very many machines. -- dik t. winter, cwi, amsterdam, nederland dik@cwi.nl