Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!hsdndev!husc6!genrad!decvax.dec.com!abyss.zk3.dec.com!kenton From: kenton@abyss.zk3.dec.com (Jeff Kenton OSG/UEG) Newsgroups: comp.sys.m88k Subject: Re: Big Endian vs. Little Endian register pairs Message-ID: <1991May1.124502.28414@decvax.dec.com> Date: 1 May 91 12:45:02 GMT References: <1991Apr30.185908.16474@eagle.lerc.nasa.gov> <1991Apr30.215621.25387@oakhill.sps.mot.com> <1991May1.120003.13827@eagle.lerc.nasa.gov> Sender: usenet@decvax.dec.com (Usenet News System) Reply-To: kenton@abyss.zk3.dec.com (Jeff Kenton OSG/UEG) Distribution: na Organization: Digital Equipment Corporation - Nashua, NH Lines: 26 Nntp-Posting-Host: abyss.zk3.dec.com In article <1991May1.120003.13827@eagle.lerc.nasa.gov>, fsset@bach.lerc.nasa.gov (Scott E. Townsend) writes: |> |> Well, I was looking at some compiler output and found it often doing |> something like this for a small double-precision constant: |> |> or.u r4,r0,hi16(constant upper half) |> or r5,r0,r0 |> fadd.ddd r6,r6,r4 |> |> This was to implement things like x += 3.0. Now if the 'endianness' of |> register pairs was reversed, an equivalent scheme would be: |> |> or.u r1,r0,hi16(constant upper half) |> fadd.ddd r7,r7,r1 |> |> Thus saving a cycle. Or, you could put the upper word of the constant into r31 :-) :-) :-) and use r31 and r0 for your double precision constant. ----------------------------------------------------------------------------- == jeff kenton Consulting at kenton@decvax.dec.com == == (617) 894-4508 (603) 881-0011 == -----------------------------------------------------------------------------