Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!rutgers!rochester!pt.cs.cmu.edu!andrew.cmu.edu!jk3k+ From: jk3k+@andrew.cmu.edu (Joe Keane) Newsgroups: comp.arch Subject: Re: Endian reversing MOVEs Message-ID: Date: 7 Feb 89 02:24:45 GMT References: <759@atanasoff.cs.iastate.edu> Organization: Mathematics, Carnegie Mellon, Pittsburgh, PA Lines: 16 In-Reply-To: <759@atanasoff.cs.iastate.edu> John Hascall writes: > ; > ; Move and Reverse Endian-ness Longword > ; > .macro MREL src,dst > PUSHL src ; stack source operand > MOVB 0(SP),-(SP) ; re-stack HI byte > MOVB 2(SP),-(SP) ; re-stack HI-MID byte > MOVB 4(SP),-(SP) ; re-stack LO-MID byte > MOVB 6(SP),-(SP) ; re-stack LO byte > MOVL (SP)+,dst ; pop it into destination operand > TSTL (SP)+ ; clear stack, set cond code > .endm That's 11 memory references for something which has nothing to do with memory. It only takes 6 instructions (0 memory references) on the RT.