Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!killer!texbell!uhnix1!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.arch Subject: Re: Endian wars Message-ID: <3057@ficc.uu.net> Date: 9 Feb 89 23:32:47 GMT References: <6133@columbia.edu> <3300050@m.cs.uiuc.edu> Organization: Xenix Support Lines: 30 In article <3300050@m.cs.uiuc.edu>, gillies@m.cs.uiuc.edu writes: > while (*p++ = *q++); p, q in registers: tst (rq) beq pool loop: movb (rq)+,(rp)+ bne loop pool: > len = *p++ = *q++; > while(len-->0) > *p++ = *q++; movb (rq)+,rtemp movb rtemp,(rp)+ beq pool loop: movb (rq)+,(rp)+ sob rtemp,loop ; not at all sure of the syntax here pool: Two instructions for the loop, either way. But the former is more likely to be implemented by a dumb compiler... what did Ritchie's compiler do for it with p and q in registers? -- Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Work: uunet.uu.net!ficc!peter, peter@ficc.uu.net, +1 713 274 5180. `-_-' Home: bigtex!texbell!sugar!peter, peter@sugar.uu.net. 'U` Opinions may not represent the policies of FICC or the Xenix Support group.