home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / arch / 12193 < prev    next >
Encoding:
Internet Message Format  |  1993-01-09  |  1.9 KB

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