Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!decvax!tektronix!tekecs!frip!andrew From: andrew@frip.gwd.tek.com (Andrew Klossner) Newsgroups: comp.arch Subject: Re: Endian reversing MOVEs Message-ID: <11038@tekecs.TEK.COM> Date: 19 Feb 89 01:07:35 GMT References: <759@atanasoff.cs.iastate.edu> <772@atanasoff.cs.iastate.edu> Sender: andrew@tekecs.TEK.COM Organization: Tektronix, Wilsonville, Oregon Lines: 17 And, for completeness, here's the endian-reversal code for the M88k (eyeballed but not tested): ; r2 is both src and dest; r3 is a temp ; r2: 0123 rot r3,r2,24 ; r3: 1230 and.u r3,r3,0xFF ; r3: z230 and r3,r3,0xFF ; r3: z2z0 rot r2,r2,8 ; r2: 3012 and.u r2,r2,0xFF00 ; r2: 3z12 and r2,r2,0xFF00 ; r2: 3z1z or r2,r2,r3 ; r2: 3210 (As you would expect, these are all single-cycle instructions.) -=- Andrew Klossner (uunet!tektronix!orca!frip!andrew) [UUCP] (andrew%frip.wv.tek.com@relay.cs.net) [ARPA]