home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!uknet!gdt!aber!fronta.aber.ac.uk!pcg
- From: pcg@aber.ac.uk (Piercarlo Grandi)
- Newsgroups: comp.arch
- Subject: Re: Swap byte instruction - how high is the win?
- Message-ID: <PCG.93Jan9114543@decb.aber.ac.uk>
- Date: 9 Jan 93 11:45:43 GMT
- References: <1993Jan7.074052.19620@qb.rhein-main.de>
- <PRENER.93Jan7233525@prener.watson.ibm.com>
- Sender: news@aber.ac.uk (USENET news service)
- Reply-To: pcg@aber.ac.uk (Piercarlo Grandi)
- Organization: Prifysgol Cymru, Aberystwyth
- Lines: 31
- In-Reply-To: prener@watson.ibm.com's message of 8 Jan 93 04: 35:25 GMT
- Nntp-Posting-Host: decb.aber.ac.uk
-
- On 8 Jan 93 04:35:25 GMT, prener@watson.ibm.com (Dan Prener) said:
-
- prener> (Volker Herminghaus-Shirai) writes:
-
- Volker> Subject line almost says it all. Many modern processors have an
- Volker> instruction to swap the bytes in a word. [ ... ] There must be
- Volker> *some* resaon why the RISC folks put it in, right?
-
- prener> The win is approximately zero for general code. But it is
- prener> significant for emulating a processor with the opposite byte
- prener> order.
-
- This is one reason: emulating a little endian x86 on a a big endian RISC
- machine. The other two reasons are:
-
- Dealing efficiently with data to/from a little endian OS (usually MSDOS
- or VMS) on a big endian machine.
-
- Dealing efficiently with network byte order (big endian) on a little
- endian machine.
-
-
- Summary: two extremely important architectures (x86 and VAX) are little
- endian; another two (68000, i.e. Mac and Sun) and network byte order are
- big endian; RISC machines tend to be big endian, but want to support
- interchange of data and emulation of little endian ones. Some RISC
- architectures are endian configurable for this reason.
- --
- Piercarlo Grandi, Dept of CS, PC/UW@Aberystwyth <pcg@aber.ac.uk>
- E l'italiano cantava, cantava. E le sue disperate invocazioni giunsero
- alle orecchie del suo divino protettore, il dio della barzelletta
-