Xref: utzoo comp.arch:8015 comp.misc:4807 comp.lang.misc:2613 comp.protocols.misc:470 Path: utzoo!attcan!uunet!pdn!alan From: alan@pdn.nm.paradyne.com (Alan Lovejoy) Newsgroups: comp.arch,comp.misc,comp.lang.misc,comp.protocols.misc Subject: Unification of big and little endian architectures. Keywords: dump little-endian strings Message-ID: <5462@pdn.nm.paradyne.com> Date: 25 Jan 89 16:49:16 GMT References: <170@microsoft.UUCP> <4008@hubcap.UUCP> <482@babbage.acc.virginia.edu> <7193@csli.STANFORD.EDU> <1371@X.UUCP> Reply-To: alan@pdn.nm.paradyne.com (0000-Alan Lovejoy) Organization: Paradyne Corporation, Largo, Florida Lines: 43 In article <1371@X.UUCP> john@frog.UUCP (John Woods) writes: >Ah, but consider the German for 1988: neunzehn hundert acht und achtzig >(nine-and-ten hundred eight and eighty). Middle-endian. AHA! Germans >are PDP-11s! Nein! Die PDP-11en sind Deutchen! (No! PDP-11s are German!) It seems that several of the ccurrent RISC architectures provide for either big or little endian operation (Rx000, 88k, 29k, ?). They do this buy providing a global operating status that can be set by the user to either big or little endian. It would be better to provide load and store operations that are specifically big or little endian: LLE.W -- load little endian word SLE.W -- store little endian word LLE.L -- load little endian long SLE.L -- store little endian long LBE.W -- load big endian word SBE.W -- store big endian word LBE.L -- load big endian long SBE.L -- store big endian long In this scheme, applications would be responsible for keeping themselves in sync with the endianness of their data, just as they already must keep themselves in sync with the byte-length of their data. Programmers could choose the endianness of data as they saw fit--based either on convenience or performance considerations. Even if LBE.L takes more cycles than LLE.L, it might still be used advantageously in a string comparison algorithm--or a 68k emulator. If the Rx000 used this approach, then DEC would still have been free to write little-endian code (and code generators), but other peoples' big-endian code would still run on DEC machines--as long as such code brings its big-endian data sets along with it. -- Alan Lovejoy; alan@pdn; 813-530-2211; ATT-Paradyne: 8550 Ulmerton, Largo, FL. Disclaimer: I do not speak for ATT-Paradyne. They do not speak for me. ___________ This Month's Slogan: Reach out and BUY someone (tm). ___________ Motto: If nanomachines will be able to reconstruct you, YOU AREN'T DEAD YET.