home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: text0522.txt
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| RFC 822 mail text
| default
| |
99%
| file
| LaTeX document text
| default
| |
98%
| file
| LaTeX document, ASCII text, with CRLF line terminators
| default
| |
100%
| TrID
| E-Mail message (Var. 5)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| gt2
| Textdatei (DOS)
| default
| |
100%
| detectItEasy
| Format: plain text[CRLF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 52 65 63 65 69 76 65 64 | 3a 20 66 72 6f 6d 20 69 |Received|: from i|
|00000010| 6e 65 74 2d 67 77 2d 31 | 2e 70 61 2e 64 65 63 2e |net-gw-1|.pa.dec.|
|00000020| 63 6f 6d 20 28 69 6e 65 | 74 2d 67 77 2d 31 2e 70 |com (ine|t-gw-1.p|
|00000030| 61 2e 64 65 63 2e 63 6f | 6d 20 5b 31 36 2e 31 2e |a.dec.co|m [16.1.|
|00000040| 30 2e 32 32 5d 29 20 62 | 79 20 6e 61 63 6d 2e 63 |0.22]) b|y nacm.c|
|00000050| 6f 6d 20 28 38 2e 36 2e | 39 2f 38 2e 36 2e 39 29 |om (8.6.|9/8.6.9)|
|00000060| 20 77 69 74 68 20 53 4d | 54 50 20 69 64 20 54 41 | with SM|TP id TA|
|00000070| 41 32 31 37 37 30 20 66 | 6f 72 20 3c 65 78 65 63 |A21770 f|or <exec|
|00000080| 75 74 6f 72 40 6e 61 63 | 6d 2e 63 6f 6d 3e 3b 20 |utor@nac|m.com>; |
|00000090| 53 61 74 2c 20 31 39 20 | 4e 6f 76 20 31 39 39 34 |Sat, 19 |Nov 1994|
|000000a0| 20 31 39 3a 32 36 3a 30 | 36 20 2d 30 38 30 30 0d | 19:26:0|6 -0800.|
|000000b0| 0a 46 72 6f 6d 3a 20 66 | 65 69 6e 67 6f 6c 64 40 |.From: f|eingold@|
|000000c0| 69 6c 6f 76 69 74 2e 7a | 6b 6f 2e 64 65 63 2e 63 |ilovit.z|ko.dec.c|
|000000d0| 6f 6d 0d 0a 52 65 63 65 | 69 76 65 64 3a 20 66 72 |om..Rece|ived: fr|
|000000e0| 6f 6d 20 69 6c 6f 76 69 | 74 2e 7a 6b 6f 2e 64 65 |om ilovi|t.zko.de|
|000000f0| 63 2e 63 6f 6d 20 62 79 | 20 69 6e 65 74 2d 67 77 |c.com by| inet-gw|
|00000100| 2d 31 2e 70 61 2e 64 65 | 63 2e 63 6f 6d 20 28 35 |-1.pa.de|c.com (5|
|00000110| 2e 36 35 2f 31 30 41 75 | 67 39 34 29 0d 0a 09 69 |.65/10Au|g94)...i|
|00000120| 64 20 41 41 30 39 33 32 | 31 3b 20 53 61 74 2c 20 |d AA0932|1; Sat, |
|00000130| 31 39 20 4e 6f 76 20 39 | 34 20 31 39 3a 32 33 3a |19 Nov 9|4 19:23:|
|00000140| 33 31 20 2d 30 38 30 30 | 0d 0a 52 65 63 65 69 76 |31 -0800|..Receiv|
|00000150| 65 64 3a 20 62 79 20 69 | 6c 6f 76 69 74 20 28 35 |ed: by i|lovit (5|
|00000160| 2e 36 35 2f 66 6d 61 2d | 31 30 30 33 39 31 29 3b |.65/fma-|100391);|
|00000170| 0d 0a 09 69 64 20 41 41 | 32 34 38 35 31 3b 20 53 |...id AA|24851; S|
|00000180| 61 74 2c 20 31 39 20 4e | 6f 76 20 31 39 39 34 20 |at, 19 N|ov 1994 |
|00000190| 32 32 3a 32 33 3a 33 30 | 20 2d 30 35 30 30 0d 0a |22:23:30| -0500..|
|000001a0| 52 65 63 65 69 76 65 64 | 3a 20 66 72 6f 6d 20 6c |Received|: from l|
|000001b0| 6f 63 61 6c 68 6f 73 74 | 20 62 79 20 61 76 65 74 |ocalhost| by avet|
|000001c0| 74 65 2e 7a 6b 6f 2e 64 | 65 63 2e 63 6f 6d 3b 20 |te.zko.d|ec.com; |
|000001d0| 28 35 2e 36 35 2f 31 2e | 31 2e 38 2e 32 2f 31 39 |(5.65/1.|1.8.2/19|
|000001e0| 53 65 70 39 34 2d 30 39 | 33 36 41 4d 29 0d 0a 09 |Sep94-09|36AM)...|
|000001f0| 69 64 20 41 41 32 36 37 | 35 35 3b 20 53 61 74 2c |id AA267|55; Sat,|
|00000200| 20 31 39 20 4e 6f 76 20 | 31 39 39 34 20 32 32 3a | 19 Nov |1994 22:|
|00000210| 32 33 3a 32 38 20 2d 30 | 35 30 30 0d 0a 4d 65 73 |23:28 -0|500..Mes|
|00000220| 73 61 67 65 2d 49 64 3a | 20 3c 39 34 31 31 32 30 |sage-Id:| <941120|
|00000230| 30 33 32 33 2e 41 41 32 | 36 37 35 35 40 61 76 65 |0323.AA2|6755@ave|
|00000240| 74 74 65 2e 7a 6b 6f 2e | 64 65 63 2e 63 6f 6d 3e |tte.zko.|dec.com>|
|00000250| 0d 0a 54 6f 3a 20 22 4d | 61 74 68 65 77 20 4a 2e |..To: "M|athew J.|
|00000260| 20 48 6f 73 74 65 74 74 | 65 72 22 20 3c 69 63 6c | Hostett|er" <icl|
|00000270| 6f 6e 65 21 6d 61 74 40 | 73 6c 6f 74 68 2e 73 77 |one!mat@|sloth.sw|
|00000280| 63 70 2e 63 6f 6d 3e 0d | 0a 43 63 3a 20 65 78 65 |cp.com>.|.Cc: exe|
|00000290| 63 75 74 6f 72 40 6e 61 | 63 6d 2e 63 6f 6d 0d 0a |cutor@na|cm.com..|
|000002a0| 53 75 62 6a 65 63 74 3a | 20 52 65 3a 20 57 68 61 |Subject:| Re: Wha|
|000002b0| 74 20 70 72 6f 67 72 61 | 6d 73 20 73 68 6f 75 6c |t progra|ms shoul|
|000002c0| 64 20 62 65 20 69 6e 63 | 6c 75 64 65 64 20 77 69 |d be inc|luded wi|
|000002d0| 74 68 20 6f 75 72 20 64 | 69 73 74 72 69 62 75 74 |th our d|istribut|
|000002e0| 69 6f 6e 3f 20 20 0d 0a | 49 6e 2d 52 65 70 6c 79 |ion? ..|In-Reply|
|000002f0| 2d 54 6f 3a 20 59 6f 75 | 72 20 6d 65 73 73 61 67 |-To: You|r messag|
|00000300| 65 20 6f 66 20 22 54 68 | 75 2c 20 31 37 20 4e 6f |e of "Th|u, 17 No|
|00000310| 76 20 39 34 20 31 31 3a | 32 35 3a 35 32 20 4d 53 |v 94 11:|25:52 MS|
|00000320| 54 2e 22 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |T.".. | |
|00000330| 20 20 3c 39 34 31 31 31 | 37 31 38 32 35 2e 41 41 | <94111|71825.AA|
|00000340| 30 38 38 38 31 40 69 63 | 6c 6f 6e 65 3e 20 0d 0a |08881@ic|lone> ..|
|00000350| 44 61 74 65 3a 20 53 61 | 74 2c 20 31 39 20 4e 6f |Date: Sa|t, 19 No|
|00000360| 76 20 39 34 20 32 32 3a | 32 33 3a 32 38 20 2d 30 |v 94 22:|23:28 -0|
|00000370| 35 30 30 0d 0a 58 2d 4d | 74 73 3a 20 73 6d 74 70 |500..X-M|ts: smtp|
|00000380| 0d 0a 53 65 6e 64 65 72 | 3a 20 6f 77 6e 65 72 2d |..Sender|: owner-|
|00000390| 65 78 65 63 75 74 6f 72 | 40 6e 61 63 6d 2e 63 6f |executor|@nacm.co|
|000003a0| 6d 0d 0a 50 72 65 63 65 | 64 65 6e 63 65 3a 20 62 |m..Prece|dence: b|
|000003b0| 75 6c 6b 0d 0a 0d 0a 0d | 0a 4d 61 74 20 2d 20 0d |ulk.....|.Mat - .|
|000003c0| 0a 0d 0a 49 20 74 68 6f | 75 67 68 74 20 79 6f 75 |...I tho|ught you|
|000003d0| 20 6d 69 67 68 74 20 62 | 65 20 69 6e 74 65 72 65 | might b|e intere|
|000003e0| 73 74 65 64 20 69 6e 20 | 74 68 69 73 2e 20 20 49 |sted in |this. I|
|000003f0| 74 27 73 20 61 20 4c 61 | 54 65 58 20 76 65 72 73 |t's a La|TeX vers|
|00000400| 69 6f 6e 20 6f 66 0d 0a | 74 68 65 20 68 69 67 68 |ion of..|the high|
|00000410| 6c 79 20 65 6e 74 65 72 | 74 61 69 6e 69 6e 67 20 |ly enter|taining |
|00000420| 73 79 6e 70 61 70 65 72 | 20 61 76 61 69 6c 61 62 |synpaper| availab|
|00000430| 6c 65 20 6f 6e 20 74 68 | 65 20 65 78 65 63 75 74 |le on th|e execut|
|00000440| 6f 72 20 66 74 70 0d 0a | 73 69 74 65 2e 20 20 49 |or ftp..|site. I|
|00000450| 74 20 6c 6f 6f 6b 73 20 | 71 75 69 74 65 20 6e 69 |t looks |quite ni|
|00000460| 63 65 20 77 68 65 6e 20 | 70 72 69 6e 74 65 64 20 |ce when |printed |
|00000470| 6f 75 74 2e 20 20 49 20 | 68 61 76 65 20 61 20 62 |out. I |have a b|
|00000480| 61 64 20 68 61 62 69 74 | 20 2d 2d 0d 0a 77 68 65 |ad habit| --..whe|
|00000490| 6e 65 76 65 72 20 49 20 | 67 65 74 20 73 6f 6d 65 |never I |get some|
|000004a0| 74 68 69 6e 67 20 69 6e | 20 41 53 43 49 49 20 66 |thing in| ASCII f|
|000004b0| 6f 72 6d 61 74 20 74 68 | 61 74 20 49 20 77 61 6e |ormat th|at I wan|
|000004c0| 74 20 74 6f 20 72 65 61 | 64 2c 20 49 0d 0a 67 65 |t to rea|d, I..ge|
|000004d0| 6e 65 72 61 6c 6c 79 20 | 65 6e 64 20 75 70 20 4c |nerally |end up L|
|000004e0| 61 54 65 58 27 69 6e 67 | 20 69 74 2c 20 73 69 6e |aTeX'ing| it, sin|
|000004f0| 63 65 20 69 74 20 64 6f | 65 73 6e 27 74 20 74 61 |ce it do|esn't ta|
|00000500| 6b 65 20 74 68 61 74 20 | 6d 75 63 68 0d 0a 74 69 |ke that |much..ti|
|00000510| 6d 65 2c 20 61 6e 64 20 | 69 74 20 6c 6f 6f 6b 73 |me, and |it looks|
|00000520| 20 6f 72 64 65 72 73 20 | 6f 66 20 6d 61 67 6e 69 | orders |of magni|
|00000530| 74 75 64 65 20 62 65 74 | 74 65 72 2e 0d 0a 0d 0a |tude bet|ter.....|
|00000540| 54 61 6b 65 20 63 61 72 | 65 2c 20 0d 0a 0d 0a 45 |Take car|e, ....E|
|00000550| 6c 61 6e 20 46 65 69 6e | 67 6f 6c 64 0d 0a 0d 0a |lan Fein|gold....|
|00000560| 38 2d 3c 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 20 62 |8-<-----|------ b|
|00000570| 65 67 69 6e 20 73 79 6e | 70 61 70 65 72 2e 74 65 |egin syn|paper.te|
|00000580| 78 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |x ------|--------|
|00000590| 3e 2d 38 0d 0a 5c 64 6f | 63 75 6d 65 6e 74 73 74 |>-8..\do|cumentst|
|000005a0| 79 6c 65 7b 61 72 74 69 | 63 6c 65 7d 0d 0a 5c 74 |yle{arti|cle}..\t|
|000005b0| 69 74 6c 65 7b 7b 5c 68 | 75 67 65 7b 53 79 6e 36 |itle{{\h|uge{Syn6|
|000005c0| 38 6b 7d 7d 20 5c 5c 20 | 41 52 44 49 27 73 20 64 |8k}} \\ |ARDI's d|
|000005d0| 79 6e 61 6d 69 63 61 6c | 6c 79 20 63 6f 6d 70 69 |ynamical|ly compi|
|000005e0| 6c 69 6e 67 20 36 38 4c | 43 30 34 30 20 65 6d 75 |ling 68L|C040 emu|
|000005f0| 6c 61 74 6f 72 7d 0d 0a | 5c 64 61 74 65 7b 5c 74 |lator}..|\date{\t|
|00000600| 6f 64 61 79 7d 0d 0a 5c | 62 65 67 69 6e 7b 64 6f |oday}..\|begin{do|
|00000610| 63 75 6d 65 6e 74 7d 0d | 0a 5c 6d 61 6b 65 74 69 |cument}.|.\maketi|
|00000620| 74 6c 65 0d 0a 0d 0a 5c | 73 65 63 74 69 6f 6e 7b |tle....\|section{|
|00000630| 4f 76 65 72 76 69 65 77 | 7d 0d 0a 0d 0a 54 68 69 |Overview|}....Thi|
|00000640| 73 20 64 6f 63 75 6d 65 | 6e 74 20 69 73 20 6d 65 |s docume|nt is me|
|00000650| 61 6e 74 20 74 6f 20 67 | 69 76 65 20 61 20 63 6f |ant to g|ive a co|
|00000660| 6e 63 69 73 65 20 74 65 | 63 68 6e 69 63 61 6c 20 |ncise te|chnical |
|00000670| 73 75 6d 6d 61 72 79 20 | 6f 66 20 68 6f 77 0d 0a |summary |of how..|
|00000680| 73 79 6e 36 38 6b 20 77 | 6f 72 6b 73 2e 0d 0a 0d |syn68k w|orks....|
|00000690| 0a 60 60 53 79 6e 36 38 | 6b 2c 27 27 20 41 52 44 |.``Syn68|k,'' ARD|
|000006a0| 49 27 73 20 36 38 4c 43 | 30 34 30 20 65 6d 75 6c |I's 68LC|040 emul|
|000006b0| 61 74 6f 72 2c 20 69 73 | 20 62 6f 74 68 20 68 69 |ator, is| both hi|
|000006c0| 67 68 6c 79 20 70 6f 72 | 74 61 62 6c 65 20 61 6e |ghly por|table an|
|000006d0| 64 0d 0a 66 61 73 74 2e | 20 20 54 68 65 20 70 6f |d..fast.| The po|
|000006e0| 72 74 61 62 6c 65 20 63 | 6f 72 65 20 6f 66 20 73 |rtable c|ore of s|
|000006f0| 79 6e 36 38 6b 2c 20 77 | 68 69 63 68 20 77 6f 72 |yn68k, w|hich wor|
|00000700| 6b 73 20 62 79 20 64 79 | 6e 61 6d 69 63 61 6c 6c |ks by dy|namicall|
|00000710| 79 0d 0a 63 6f 6d 70 69 | 6c 69 6e 67 20 36 38 30 |y..compi|ling 680|
|00000720| 78 30 20 63 6f 64 65 20 | 69 6e 74 6f 20 61 6e 20 |x0 code |into an |
|00000730| 65 66 66 69 63 69 65 6e | 74 20 69 6e 74 65 72 70 |efficien|t interp|
|00000740| 72 65 74 65 64 20 66 6f | 72 6d 2c 20 77 61 73 20 |reted fo|rm, was |
|00000750| 64 65 73 69 67 6e 65 64 | 0d 0a 74 6f 20 72 75 6e |designed|..to run|
|00000760| 20 6f 6e 20 61 6c 6c 20 | 6d 61 6a 6f 72 20 43 50 | on all |major CP|
|00000770| 55 27 73 2e 20 20 4f 6e | 20 73 75 70 70 6f 72 74 |U's. On| support|
|00000780| 65 64 20 61 72 63 68 69 | 74 65 63 74 75 72 65 73 |ed archi|tectures|
|00000790| 2c 20 73 79 6e 36 38 6b | 20 63 61 6e 0d 0a 61 6c |, syn68k| can..al|
|000007a0| 73 6f 20 74 72 61 6e 73 | 6c 61 74 65 20 36 38 30 |so trans|late 680|
|000007b0| 78 30 20 63 6f 64 65 20 | 69 6e 74 6f 20 6e 61 74 |x0 code |into nat|
|000007c0| 69 76 65 20 63 6f 64 65 | 20 74 68 61 74 20 74 68 |ive code| that th|
|000007d0| 65 20 68 6f 73 74 20 70 | 72 6f 63 65 73 73 6f 72 |e host p|rocessor|
|000007e0| 0d 0a 63 61 6e 20 72 75 | 6e 20 64 69 72 65 63 74 |..can ru|n direct|
|000007f0| 6c 79 2e 0d 0a 0d 0a 5c | 73 65 63 74 69 6f 6e 7b |ly.....\|section{|
|00000800| 53 79 6e 67 65 6e 7d 0d | 0a 0d 0a 41 52 44 49 27 |Syngen}.|...ARDI'|
|00000810| 73 20 60 60 73 79 6e 67 | 65 6e 27 27 20 73 79 73 |s ``syng|en'' sys|
|00000820| 74 65 6d 20 61 6e 61 6c | 79 7a 65 73 20 61 20 6c |tem anal|yzes a l|
|00000830| 69 73 70 2d 6c 69 6b 65 | 20 66 69 6c 65 20 64 65 |isp-like| file de|
|00000840| 73 63 72 69 62 69 6e 67 | 20 74 68 65 0d 0a 62 69 |scribing| the..bi|
|00000850| 74 20 70 61 74 74 65 72 | 6e 73 20 61 6e 64 20 73 |t patter|ns and s|
|00000860| 65 6d 61 6e 74 69 63 73 | 20 6f 66 20 74 68 65 20 |emantics| of the |
|00000870| 36 38 30 78 30 20 69 6e | 73 74 72 75 63 74 69 6f |680x0 in|structio|
|00000880| 6e 20 73 65 74 20 61 6e | 64 20 70 72 6f 64 75 63 |n set an|d produc|
|00000890| 65 73 0d 0a 6c 6f 6f 6b | 75 70 20 74 61 62 6c 65 |es..look|up table|
|000008a0| 73 20 61 6e 64 20 43 20 | 63 6f 64 65 20 66 6f 72 |s and C |code for|
|000008b0| 20 74 68 65 20 72 75 6e | 74 69 6d 65 20 73 79 73 | the run|time sys|
|000008c0| 74 65 6d 20 74 6f 20 75 | 73 65 2e 20 20 54 68 69 |tem to u|se. Thi|
|000008d0| 73 0d 0a 70 72 6f 63 65 | 73 73 20 74 61 6b 65 73 |s..proce|ss takes|
|000008e0| 20 70 6c 61 63 65 20 6f | 6e 6c 79 20 77 68 65 6e | place o|nly when|
|000008f0| 20 73 79 6e 36 38 6b 20 | 69 73 20 62 75 69 6c 74 | syn68k |is built|
|00000900| 2c 20 73 6f 20 77 65 20 | 63 61 6e 20 61 66 66 6f |, so we |can affo|
|00000910| 72 64 0d 0a 65 78 74 65 | 6e 73 69 76 65 20 61 6e |rd..exte|nsive an|
|00000920| 61 6c 79 73 69 73 20 68 | 65 72 65 2e 20 20 54 68 |alysis h|ere. Th|
|00000930| 65 20 63 6f 64 65 20 61 | 6e 64 20 74 61 62 6c 65 |e code a|nd table|
|00000940| 73 20 67 65 6e 65 72 61 | 74 65 64 20 62 79 20 73 |s genera|ted by s|
|00000950| 79 6e 67 65 6e 0d 0a 64 | 65 70 65 6e 64 20 73 6f |yngen..d|epend so|
|00000960| 6d 65 77 68 61 74 20 6f | 6e 20 74 68 65 20 63 68 |mewhat o|n the ch|
|00000970| 61 72 61 63 74 65 72 69 | 73 74 69 63 73 20 6f 66 |aracteri|stics of|
|00000980| 20 74 68 65 20 68 6f 73 | 74 20 70 72 6f 63 65 73 | the hos|t proces|
|00000990| 73 6f 72 3b 20 66 6f 72 | 0d 0a 65 78 61 6d 70 6c |sor; for|..exampl|
|000009a0| 65 2c 20 6f 6e 20 61 20 | 6c 69 74 74 6c 65 20 65 |e, on a |little e|
|000009b0| 6e 64 69 61 6e 20 6d 61 | 63 68 69 6e 65 20 69 74 |ndian ma|chine it|
|000009c0| 20 69 73 20 61 64 76 61 | 6e 74 61 67 65 6f 75 73 | is adva|ntageous|
|000009d0| 20 74 6f 20 62 79 74 65 | 20 73 77 61 70 0d 0a 73 | to byte| swap..s|
|000009e0| 6f 6d 65 20 65 78 74 72 | 61 63 74 65 64 20 36 38 |ome extr|acted 68|
|000009f0| 30 78 30 20 6f 70 65 72 | 61 6e 64 73 20 61 74 20 |0x0 oper|ands at |
|00000a00| 63 6f 6d 70 69 6c 65 20 | 74 69 6d 65 20 69 6e 73 |compile |time ins|
|00000a10| 74 65 61 64 20 6f 66 20 | 61 74 20 72 75 6e 74 69 |tead of |at runti|
|00000a20| 6d 65 2e 0d 0a 0d 0a 54 | 68 65 20 36 38 30 78 30 |me.....T|he 680x0|
|00000a30| 20 64 65 73 63 72 69 70 | 74 69 6f 6e 20 66 69 6c | descrip|tion fil|
|00000a40| 65 20 63 61 6e 20 64 65 | 73 63 72 69 62 65 20 6d |e can de|scribe m|
|00000a50| 75 6c 74 69 70 6c 65 20 | 77 61 79 73 20 74 6f 20 |ultiple |ways to |
|00000a60| 65 6d 75 6c 61 74 65 0d | 0a 61 6e 79 20 70 61 72 |emulate.|.any par|
|00000a70| 74 69 63 75 6c 61 72 20 | 36 38 30 78 30 20 6f 70 |ticular |680x0 op|
|00000a80| 63 6f 64 65 2e 20 20 54 | 68 65 20 72 75 6e 74 69 |code. T|he runti|
|00000a90| 6d 65 20 73 79 73 74 65 | 6d 20 6c 6f 6f 6b 73 20 |me syste|m looks |
|00000aa0| 61 74 20 77 68 61 74 20 | 43 43 0d 0a 62 69 74 73 |at what |CC..bits|
|00000ab0| 20 61 72 65 20 6c 69 76 | 65 20 61 66 74 65 72 20 | are liv|e after |
|00000ac0| 74 68 65 20 69 6e 73 74 | 72 75 63 74 69 6f 6e 20 |the inst|ruction |
|00000ad0| 61 6e 64 20 63 68 6f 6f | 73 65 73 20 74 68 65 20 |and choo|ses the |
|00000ae0| 66 61 73 74 65 73 74 20 | 76 61 72 69 61 6e 74 0d |fastest |variant.|
|00000af0| 0a 69 74 20 63 61 6e 20 | 6c 65 67 61 6c 6c 79 20 |.it can |legally |
|00000b00| 75 73 65 2e 20 20 49 6e | 20 74 68 65 20 66 6f 6c |use. In| the fol|
|00000b10| 6c 6f 77 69 6e 67 20 65 | 78 61 6d 70 6c 65 2c 20 |lowing e|xample, |
|00000b20| 77 65 20 68 61 76 65 20 | 74 77 6f 20 43 43 0d 0a |we have |two CC..|
|00000b30| 76 61 72 69 61 6e 74 73 | 20 6f 66 20 6c 73 72 77 |variants| of lsrw|
|00000b40| 3b 20 6f 6e 65 20 63 6f | 6d 70 75 74 65 73 20 6e |; one co|mputes n|
|00000b50| 6f 20 43 43 20 62 69 74 | 73 2c 20 61 6e 64 20 74 |o CC bit|s, and t|
|00000b60| 68 65 20 6f 74 68 65 72 | 20 63 6f 6d 70 75 74 65 |he other| compute|
|00000b70| 73 0d 0a 61 6c 6c 20 6f | 66 20 74 68 65 6d 3a 0d |s..all o|f them:.|
|00000b80| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 76 65 72 62 61 74 |...\begi|n{verbat|
|00000b90| 69 6d 7d 0d 0a 28 64 65 | 66 6f 70 63 6f 64 65 20 |im}..(de|fopcode |
|00000ba0| 6c 73 72 77 5f 65 61 0d | 0a 20 20 28 6c 69 73 74 |lsrw_ea.|. (list|
|00000bb0| 20 36 38 30 30 30 20 61 | 6d 6f 64 65 5f 61 6c 74 | 68000 a|mode_alt|
|00000bc0| 65 72 61 62 6c 65 5f 6d | 65 6d 6f 72 79 20 28 29 |erable_m|emory ()|
|00000bd0| 20 28 6c 69 73 74 20 22 | 31 31 31 30 30 30 31 30 | (list "|11100010|
|00000be0| 31 31 6d 6d 6d 6d 6d 6d | 22 29 29 0d 0a 20 20 28 |11mmmmmm|")).. (|
|00000bf0| 6c 69 73 74 20 22 2d 2d | 2d 2d 2d 22 20 22 2d 2d |list "--|---" "--|
|00000c00| 2d 2d 2d 22 20 64 6f 6e | 74 5f 65 78 70 61 6e 64 |---" don|t_expand|
|00000c10| 0d 0a 09 28 61 73 73 69 | 67 6e 20 24 31 2e 6d 75 |...(assi|gn $1.mu|
|00000c20| 77 20 28 3e 3e 20 24 31 | 2e 6d 75 77 20 31 29 29 |w (>> $1|.muw 1))|
|00000c30| 29 0d 0a 20 20 28 6c 69 | 73 74 20 22 43 4e 30 58 |).. (li|st "CN0X|
|00000c40| 5a 22 20 22 2d 2d 2d 2d | 2d 22 20 64 6f 6e 74 5f |Z" "----|-" dont_|
|00000c50| 65 78 70 61 6e 64 0d 0a | 09 28 6c 69 73 74 0d 0a |expand..|.(list..|
|00000c60| 09 20 28 61 73 73 69 67 | 6e 20 63 63 78 20 28 61 |. (assig|n ccx (a|
|00000c70| 73 73 69 67 6e 20 63 63 | 63 20 28 26 20 24 31 2e |ssign cc|c (& $1.|
|00000c80| 6d 75 77 20 31 29 29 29 | 0d 0a 09 20 28 41 53 53 |muw 1)))|... (ASS|
|00000c90| 49 47 4e 5f 4e 4e 5a 5f | 57 4f 52 44 20 28 61 73 |IGN_NNZ_|WORD (as|
|00000ca0| 73 69 67 6e 20 24 31 2e | 6d 75 77 20 28 3e 3e 20 |sign $1.|muw (>> |
|00000cb0| 24 31 2e 6d 75 77 20 31 | 29 29 29 29 29 29 0d 0a |$1.muw 1|))))))..|
|00000cc0| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0d 0a |\end{ver|batim}..|
|00000cd0| 0d 0a 54 68 65 20 36 38 | 30 78 30 20 64 65 73 63 |..The 68|0x0 desc|
|00000ce0| 72 69 70 74 69 6f 6e 20 | 66 69 6c 65 20 63 61 6e |ription |file can|
|00000cf0| 20 61 6c 73 6f 20 73 70 | 65 63 69 66 79 20 77 68 | also sp|ecify wh|
|00000d00| 69 63 68 20 36 38 30 78 | 30 20 6f 70 65 72 61 6e |ich 680x|0 operan|
|00000d10| 64 73 0d 0a 73 68 6f 75 | 6c 64 20 62 65 20 60 60 |ds..shou|ld be ``|
|00000d20| 65 78 70 61 6e 64 65 64 | 27 27 20 74 6f 20 62 65 |expanded|'' to be|
|00000d30| 63 6f 6d 65 20 69 6d 70 | 6c 69 63 69 74 6c 79 20 |come imp|licitly |
|00000d40| 6b 6e 6f 77 6e 20 62 79 | 20 74 68 65 20 63 6f 72 |known by| the cor|
|00000d50| 72 65 73 70 6f 6e 64 69 | 6e 67 0d 0a 73 79 6e 74 |respondi|ng..synt|
|00000d60| 68 65 74 69 63 20 6f 70 | 63 6f 64 65 2e 20 20 46 |hetic op|code. F|
|00000d70| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 66 75 6c 6c |or examp|le, full|
|00000d80| 79 20 65 78 70 61 6e 64 | 69 6e 67 20 6f 75 74 20 |y expand|ing out |
|00000d90| 60 60 61 64 64 6c 20 64 | 78 2c 64 79 27 27 0d 0a |``addl d|x,dy''..|
|00000da0| 77 6f 75 6c 64 20 72 65 | 73 75 6c 74 20 69 6e 20 |would re|sult in |
|00000db0| 36 34 20 73 79 6e 74 68 | 65 74 69 63 20 6f 70 63 |64 synth|etic opc|
|00000dc0| 6f 64 65 73 2c 20 6f 6e | 65 20 66 6f 72 20 65 61 |odes, on|e for ea|
|00000dd0| 63 68 20 63 6f 6d 62 69 | 6e 61 74 69 6f 6e 20 6f |ch combi|nation o|
|00000de0| 66 0d 0a 64 61 74 61 20 | 72 65 67 69 73 74 65 72 |f..data |register|
|00000df0| 20 6f 70 65 72 61 6e 64 | 73 2e 20 20 54 68 69 73 | operand|s. This|
|00000e00| 20 72 65 73 75 6c 74 73 | 20 69 6e 20 73 6d 61 6c | results| in smal|
|00000e10| 6c 65 72 20 61 6e 64 20 | 66 61 73 74 65 72 20 73 |ler and |faster s|
|00000e20| 79 6e 74 68 65 74 69 63 | 0d 0a 6f 70 63 6f 64 65 |ynthetic|..opcode|
|00000e30| 73 20 61 74 20 74 68 65 | 20 65 78 70 65 6e 73 65 |s at the| expense|
|00000e40| 20 6f 66 20 69 6e 63 72 | 65 61 73 69 6e 67 20 74 | of incr|easing t|
|00000e50| 68 65 20 74 6f 74 61 6c | 20 6e 75 6d 62 65 72 20 |he total| number |
|00000e60| 6f 66 20 73 79 6e 74 68 | 65 74 69 63 0d 0a 6f 70 |of synth|etic..op|
|00000e70| 63 6f 64 65 73 2e 20 20 | 54 6f 20 63 6f 6e 73 65 |codes. |To conse|
|00000e80| 72 76 65 20 73 70 61 63 | 65 2c 20 77 65 20 6f 6e |rve spac|e, we on|
|00000e90| 6c 79 20 65 78 70 61 6e | 64 20 6f 75 74 20 63 6f |ly expan|d out co|
|00000ea0| 6d 6d 6f 6e 20 36 38 30 | 78 30 20 6f 70 63 6f 64 |mmon 680|x0 opcod|
|00000eb0| 65 73 2e 0d 0a 4f 6e 20 | 68 6f 73 74 20 61 72 63 |es...On |host arc|
|00000ec0| 68 69 74 65 63 74 75 72 | 65 73 20 77 68 65 72 65 |hitectur|es where|
|00000ed0| 20 77 65 20 63 61 6e 20 | 63 6f 6d 70 69 6c 65 20 | we can |compile |
|00000ee0| 74 6f 20 6e 61 74 69 76 | 65 20 63 6f 64 65 2c 20 |to nativ|e code, |
|00000ef0| 77 65 20 64 6f 6e 27 74 | 0d 0a 77 61 73 74 65 20 |we don't|..waste |
|00000f00| 73 70 61 63 65 20 62 79 | 20 60 60 65 78 70 61 6e |space by| ``expan|
|00000f10| 64 69 6e 67 20 6f 75 74 | 27 27 20 63 6f 6d 6d 6f |ding out|'' commo|
|00000f20| 6e 20 73 79 6e 74 68 65 | 74 69 63 20 6f 70 63 6f |n synthe|tic opco|
|00000f30| 64 65 73 2e 0d 0a 0d 0a | 5c 73 65 63 74 69 6f 6e |des.....|\section|
|00000f40| 7b 54 65 73 74 20 73 75 | 69 74 65 73 7d 0d 0a 0d |{Test su|ites}...|
|00000f50| 0a 41 52 44 49 20 68 61 | 73 20 61 20 6c 61 72 67 |.ARDI ha|s a larg|
|00000f60| 65 20 73 65 74 20 6f 66 | 20 74 65 73 74 20 73 75 |e set of| test su|
|00000f70| 69 74 65 73 20 74 68 61 | 74 20 74 72 79 20 74 68 |ites tha|t try th|
|00000f80| 6f 75 73 61 6e 64 73 20 | 75 70 6f 6e 20 74 68 6f |ousands |upon tho|
|00000f90| 75 73 61 6e 64 73 0d 0a | 6f 66 20 76 61 72 69 61 |usands..|of varia|
|00000fa0| 74 69 6f 6e 73 20 6f 66 | 20 36 38 30 78 30 20 6f |tions of| 680x0 o|
|00000fb0| 70 63 6f 64 65 73 20 61 | 6e 64 20 63 6f 6d 70 61 |pcodes a|nd compa|
|00000fc0| 72 65 20 74 68 65 20 72 | 65 73 75 6c 74 73 20 74 |re the r|esults t|
|00000fd0| 6f 20 74 68 6f 73 65 0d | 0a 67 65 6e 65 72 61 74 |o those.|.generat|
|00000fe0| 65 64 20 62 79 20 61 20 | 72 65 61 6c 20 36 38 30 |ed by a |real 680|
|00000ff0| 34 30 2e 20 20 54 68 65 | 73 65 20 74 65 73 74 20 |40. The|se test |
|00001000| 73 75 69 74 65 73 20 68 | 61 76 65 20 70 72 6f 76 |suites h|ave prov|
|00001010| 65 6e 20 74 6f 20 62 65 | 20 61 6e 0d 0a 69 6e 76 |en to be| an..inv|
|00001020| 61 6c 75 61 62 6c 65 20 | 64 65 62 75 67 67 69 6e |aluable |debuggin|
|00001030| 67 20 74 6f 6f 6c 2c 20 | 62 6f 74 68 20 61 73 20 |g tool, |both as |
|00001040| 6e 65 77 20 66 65 61 74 | 75 72 65 73 20 61 72 65 |new feat|ures are|
|00001050| 20 61 64 64 65 64 20 61 | 6e 64 20 61 73 0d 0a 77 | added a|nd as..w|
|00001060| 65 20 68 61 76 65 20 70 | 6f 72 74 65 64 20 73 79 |e have p|orted sy|
|00001070| 6e 36 38 6b 20 74 6f 20 | 6f 74 68 65 72 20 61 72 |n68k to |other ar|
|00001080| 63 68 69 74 65 63 74 75 | 72 65 73 20 28 6e 6f 74 |chitectu|res (not|
|00001090| 61 62 6c 79 20 38 30 78 | 38 36 2c 20 36 38 30 78 |ably 80x|86, 680x|
|000010a0| 30 2c 0d 0a 69 38 36 30 | 20 61 6e 64 20 41 6c 70 |0,..i860| and Alp|
|000010b0| 68 61 29 2e 20 20 4f 75 | 72 20 6e 61 74 69 76 65 |ha). Ou|r native|
|000010c0| 20 63 6f 64 65 20 73 75 | 70 70 6f 72 74 20 69 73 | code su|pport is|
|000010d0| 20 73 6f 20 72 65 63 65 | 6e 74 20 74 68 61 74 20 | so rece|nt that |
|000010e0| 6f 75 72 0d 0a 74 65 73 | 74 20 73 75 69 74 65 73 |our..tes|t suites|
|000010f0| 20 64 6f 20 6e 6f 74 20 | 79 65 74 20 61 64 65 71 | do not |yet adeq|
|00001100| 75 61 74 65 6c 79 20 74 | 65 73 74 20 61 6c 6c 20 |uately t|est all |
|00001110| 6f 66 20 74 68 65 20 73 | 69 74 75 61 74 69 6f 6e |of the s|ituation|
|00001120| 73 20 74 68 61 74 0d 0a | 61 72 69 73 65 20 77 68 |s that..|arise wh|
|00001130| 65 6e 20 67 65 6e 65 72 | 61 74 69 6e 67 20 6e 61 |en gener|ating na|
|00001140| 74 69 76 65 20 63 6f 64 | 65 2c 20 62 75 74 20 77 |tive cod|e, but w|
|00001150| 65 20 70 6c 61 6e 20 74 | 6f 20 65 78 74 65 6e 64 |e plan t|o extend|
|00001160| 20 74 68 65 6d 20 69 6e | 0d 0a 74 68 65 20 6e 65 | them in|..the ne|
|00001170| 61 72 20 66 75 74 75 72 | 65 2e 0d 0a 0d 0a 5c 73 |ar futur|e.....\s|
|00001180| 65 63 74 69 6f 6e 7b 49 | 6e 74 65 72 70 72 65 74 |ection{I|nterpret|
|00001190| 65 64 20 63 6f 64 65 7d | 0d 0a 0d 0a 4f 75 72 20 |ed code}|....Our |
|000011a0| 69 6e 74 65 72 70 72 65 | 74 65 64 20 63 6f 64 65 |interpre|ted code|
|000011b0| 20 63 6f 6e 73 69 73 74 | 73 20 6f 66 20 63 6f 6e | consist|s of con|
|000011c0| 74 69 67 75 6f 75 73 20 | 73 65 71 75 65 6e 63 65 |tiguous |sequence|
|000011d0| 73 20 6f 66 20 60 60 73 | 79 6e 74 68 65 74 69 63 |s of ``s|ynthetic|
|000011e0| 0d 0a 6f 70 63 6f 64 65 | 73 27 27 20 61 6e 64 20 |..opcode|s'' and |
|000011f0| 74 68 65 69 72 20 6f 70 | 65 72 61 6e 64 73 2e 20 |their op|erands. |
|00001200| 20 53 79 6e 67 65 6e 20 | 63 61 6e 20 67 65 6e 65 | Syngen |can gene|
|00001210| 72 61 74 65 20 41 4e 53 | 49 20 43 2c 20 62 75 74 |rate ANS|I C, but|
|00001220| 20 77 68 65 6e 0d 0a 63 | 6f 6d 70 69 6c 65 64 20 | when..c|ompiled |
|00001230| 77 69 74 68 20 67 63 63 | 20 69 74 20 75 73 65 73 |with gcc| it uses|
|00001240| 20 43 20 6c 61 6e 67 75 | 61 67 65 20 65 78 74 65 | C langu|age exte|
|00001250| 6e 73 69 6f 6e 73 20 74 | 68 61 74 20 6d 61 6b 65 |nsions t|hat make|
|00001260| 20 73 79 6e 74 68 65 74 | 69 63 0d 0a 6f 70 63 6f | synthet|ic..opco|
|00001270| 64 65 73 20 70 6f 69 6e | 74 65 72 73 20 74 6f 20 |des poin|ters to |
|00001280| 74 68 65 20 43 20 63 6f | 64 65 20 72 65 73 70 6f |the C co|de respo|
|00001290| 6e 73 69 62 6c 65 20 66 | 6f 72 20 69 6e 74 65 72 |nsible f|or inter|
|000012a0| 70 72 65 74 69 6e 67 20 | 74 68 61 74 0d 0a 6f 70 |preting |that..op|
|000012b0| 63 6f 64 65 2e 20 20 54 | 68 69 73 20 60 60 74 68 |code. T|his ``th|
|000012c0| 72 65 61 64 65 64 20 69 | 6e 74 65 72 70 72 65 74 |readed i|nterpret|
|000012d0| 69 6e 67 27 27 20 65 6e | 74 69 72 65 6c 79 20 65 |ing'' en|tirely e|
|000012e0| 6c 69 6d 69 6e 61 74 65 | 73 20 73 77 69 74 63 68 |liminate|s switch|
|000012f0| 0d 0a 64 69 73 70 61 74 | 63 68 20 61 6e 64 20 6c |..dispat|ch and l|
|00001300| 6f 6f 70 20 6f 76 65 72 | 68 65 61 64 2e 0d 0a 0d |oop over|head....|
|00001310| 0a 54 6f 20 69 6c 6c 75 | 73 74 72 61 74 65 20 74 |.To illu|strate t|
|00001320| 68 65 20 61 62 6f 76 65 | 20 70 6f 69 6e 74 73 2c |he above| points,|
|00001330| 20 68 65 72 65 20 69 73 | 20 74 68 65 20 61 73 73 | here is| the ass|
|00001340| 65 6d 62 6c 79 20 6c 61 | 6e 67 75 61 67 65 0d 0a |embly la|nguage..|
|00001350| 67 65 6e 65 72 61 74 65 | 64 20 66 6f 72 20 74 68 |generate|d for th|
|00001360| 65 20 73 79 6e 74 68 65 | 74 69 63 20 6f 70 63 6f |e synthe|tic opco|
|00001370| 64 65 20 74 68 61 74 20 | 77 6f 75 6c 64 20 68 61 |de that |would ha|
|00001380| 6e 64 6c 65 20 61 20 66 | 75 6c 6c 79 20 65 78 70 |ndle a f|ully exp|
|00001390| 61 6e 64 65 64 0d 0a 60 | 60 61 64 64 6c 20 64 30 |anded..`|`addl d0|
|000013a0| 2c 64 31 27 27 20 77 68 | 65 6e 20 6e 6f 20 43 43 |,d1'' wh|en no CC|
|000013b0| 20 62 69 74 20 76 61 6c | 75 65 73 20 61 72 65 20 | bit val|ues are |
|000013c0| 72 65 71 75 69 72 65 64 | 2e 20 20 54 68 69 73 20 |required|. This |
|000013d0| 69 73 20 77 68 61 74 0d | 0a 67 63 63 27 73 20 38 |is what.|.gcc's 8|
|000013e0| 30 78 38 36 20 6f 75 74 | 70 75 74 20 6c 6f 6f 6b |0x86 out|put look|
|000013f0| 73 20 6c 69 6b 65 20 28 | 65 64 69 74 65 64 20 66 |s like (|edited f|
|00001400| 6f 72 20 72 65 61 64 61 | 62 69 6c 69 74 79 29 20 |or reada|bility) |
|00001410| 61 66 74 65 72 20 77 65 | 0d 0a 72 75 6e 20 6f 75 |after we|..run ou|
|00001420| 72 20 69 6e 74 65 72 70 | 72 65 74 65 72 20 74 68 |r interp|reter th|
|00001430| 72 6f 75 67 68 20 41 52 | 44 49 27 73 20 50 65 6e |rough AR|DI's Pen|
|00001440| 74 69 75 6d 2d 73 70 65 | 63 69 66 69 63 20 69 6e |tium-spe|cific in|
|00001450| 73 74 72 75 63 74 69 6f | 6e 0d 0a 73 63 68 65 64 |structio|n..sched|
|00001460| 75 6c 69 6e 67 20 50 65 | 72 6c 20 73 63 72 69 70 |uling Pe|rl scrip|
|00001470| 74 3a 0d 0a 0d 0a 5c 62 | 65 67 69 6e 7b 76 65 72 |t:....\b|egin{ver|
|00001480| 62 61 74 69 6d 7d 0d 0a | 09 6d 6f 76 6c 09 5f 64 |batim}..|.movl._d|
|00001490| 30 2c 25 65 61 78 09 3b | 20 66 65 74 63 68 20 64 |0,%eax.;| fetch d|
|000014a0| 30 0d 0a 09 6d 6f 76 6c | 09 28 25 65 73 69 29 2c |0...movl|.(%esi),|
|000014b0| 25 65 64 69 09 3b 20 66 | 65 74 63 68 20 6e 65 78 |%edi.; f|etch nex|
|000014c0| 74 20 73 79 6e 74 68 65 | 74 69 63 20 6f 70 63 6f |t synthe|tic opco|
|000014d0| 64 65 0d 0a 09 61 64 64 | 6c 09 25 65 61 78 2c 5f |de...add|l.%eax,_|
|000014e0| 64 31 09 3b 20 64 6f 20 | 74 68 65 20 61 64 64 0d |d1.; do |the add.|
|000014f0| 0a 09 61 64 64 6c 09 24 | 34 2c 25 65 73 69 09 09 |..addl.$|4,%esi..|
|00001500| 3b 20 69 6e 63 72 65 6d | 65 6e 74 20 73 79 6e 74 |; increm|ent synt|
|00001510| 68 65 74 69 63 20 50 43 | 0d 0a 09 6a 6d 70 09 2a |hetic PC|...jmp.*|
|00001520| 25 65 64 69 09 09 3b 20 | 6a 75 6d 70 20 74 6f 20 |%edi..; |jump to |
|00001530| 6e 65 78 74 20 73 79 6e | 74 68 65 74 69 63 20 6f |next syn|thetic o|
|00001540| 70 63 6f 64 65 20 68 61 | 6e 64 6c 65 72 0d 0a 5c |pcode ha|ndler..\|
|00001550| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 0d 0a 0d |end{verb|atim}...|
|00001560| 0a 57 65 20 6d 75 73 74 | 20 65 6d 70 68 61 73 69 |.We must| emphasi|
|00001570| 7a 65 20 74 68 61 74 20 | 74 68 65 20 70 72 65 63 |ze that |the prec|
|00001580| 65 64 69 6e 67 20 65 78 | 61 6d 70 6c 65 20 69 73 |eding ex|ample is|
|00001590| 20 6e 6f 74 20 6e 61 74 | 69 76 65 20 63 6f 64 65 | not nat|ive code|
|000015a0| 0d 0a 67 65 6e 65 72 61 | 74 65 64 20 62 79 20 6f |..genera|ted by o|
|000015b0| 75 72 20 65 6d 75 6c 61 | 74 6f 72 2c 20 62 75 74 |ur emula|tor, but|
|000015c0| 20 6d 65 72 65 6c 79 20 | 61 20 73 6e 69 70 70 65 | merely |a snippe|
|000015d0| 74 20 6f 66 20 77 68 61 | 74 20 67 63 63 20 67 65 |t of wha|t gcc ge|
|000015e0| 6e 65 72 61 74 65 73 0d | 0a 66 6f 72 20 6f 75 72 |nerates.|.for our|
|000015f0| 20 69 6e 74 65 72 70 72 | 65 74 65 72 2e 20 20 54 | interpr|eter. T|
|00001600| 68 69 73 20 67 69 76 65 | 73 20 79 6f 75 20 73 6f |his give|s you so|
|00001610| 6d 65 20 69 64 65 61 20 | 6f 66 20 74 68 65 20 65 |me idea |of the e|
|00001620| 66 66 69 63 69 65 6e 63 | 79 0d 0a 6f 66 20 74 68 |fficienc|y..of th|
|00001630| 65 20 70 6f 72 74 61 62 | 6c 65 20 63 6f 6d 70 6f |e portab|le compo|
|00001640| 6e 65 6e 74 20 6f 66 20 | 6f 75 72 20 65 6d 75 6c |nent of |our emul|
|00001650| 61 74 6f 72 2e 0d 0a 0d | 0a 5c 73 65 63 74 69 6f |ator....|.\sectio|
|00001660| 6e 7b 4e 61 74 69 76 65 | 20 63 6f 64 65 7d 0d 0a |n{Native| code}..|
|00001670| 0d 0a 53 79 6e 36 38 6b | 20 73 75 70 70 6f 72 74 |..Syn68k| support|
|00001680| 73 20 6f 70 74 69 6f 6e | 61 6c 20 61 72 63 68 69 |s option|al archi|
|00001690| 74 65 63 74 75 72 65 2d | 73 70 65 63 69 66 69 63 |tecture-|specific|
|000016a0| 20 6e 61 74 69 76 65 20 | 63 6f 64 65 20 65 78 74 | native |code ext|
|000016b0| 65 6e 73 69 6f 6e 73 2e | 0d 0a 4f 6e 20 73 79 73 |ensions.|..On sys|
|000016c0| 74 65 6d 73 20 77 68 65 | 72 65 20 74 68 65 79 20 |tems whe|re they |
|000016d0| 61 72 65 20 70 72 65 73 | 65 6e 74 2c 20 74 68 65 |are pres|ent, the|
|000016e0| 20 72 75 6e 74 69 6d 65 | 20 73 79 73 74 65 6d 20 | runtime| system |
|000016f0| 74 72 69 65 73 20 74 6f | 0d 0a 67 65 6e 65 72 61 |tries to|..genera|
|00001700| 74 65 20 6e 61 74 69 76 | 65 20 63 6f 64 65 20 77 |te nativ|e code w|
|00001710| 68 65 6e 65 76 65 72 20 | 70 6f 73 73 69 62 6c 65 |henever |possible|
|00001720| 2e 20 20 49 6e 20 74 68 | 6f 73 65 20 72 61 72 65 |. In th|ose rare|
|00001730| 20 63 61 73 65 73 20 77 | 68 65 6e 0d 0a 69 74 20 | cases w|hen..it |
|00001740| 63 61 6e 6e 6f 74 2c 20 | 69 74 20 72 65 76 65 72 |cannot, |it rever|
|00001750| 74 73 20 74 6f 20 6f 75 | 72 20 69 6e 74 65 72 70 |ts to ou|r interp|
|00001760| 72 65 74 65 64 20 63 6f | 64 65 2e 20 20 53 69 6e |reted co|de. Sin|
|00001770| 63 65 20 73 79 6e 36 38 | 6b 20 73 75 70 70 6f 72 |ce syn68|k suppor|
|00001780| 74 73 0d 0a 62 6f 74 68 | 20 6e 61 74 69 76 65 20 |ts..both| native |
|00001790| 61 6e 64 20 73 79 6e 74 | 68 65 74 69 63 20 63 6f |and synt|hetic co|
|000017a0| 64 65 2c 20 74 68 65 20 | 72 75 6e 74 69 6d 65 20 |de, the |runtime |
|000017b0| 73 79 73 74 65 6d 20 61 | 75 74 6f 6d 61 74 69 63 |system a|utomatic|
|000017c0| 61 6c 6c 79 0d 0a 69 6e | 73 65 72 74 73 20 67 61 |ally..in|serts ga|
|000017d0| 74 65 77 61 79 73 20 62 | 65 74 77 65 65 6e 20 74 |teways b|etween t|
|000017e0| 68 65 20 74 77 6f 20 77 | 68 65 6e 65 76 65 72 20 |he two w|henever |
|000017f0| 74 68 65 72 65 20 69 73 | 20 61 20 74 72 61 6e 73 |there is| a trans|
|00001800| 69 74 69 6f 6e 2e 0d 0a | 54 68 69 73 20 61 70 70 |ition...|This app|
|00001810| 72 6f 61 63 68 20 61 6c | 6c 6f 77 73 20 75 73 20 |roach al|lows us |
|00001820| 74 6f 20 67 72 61 64 75 | 61 6c 6c 79 20 70 68 61 |to gradu|ally pha|
|00001830| 73 65 20 69 6e 20 6e 61 | 74 69 76 65 20 63 6f 64 |se in na|tive cod|
|00001840| 65 20 68 61 6e 64 6c 65 | 72 73 0d 0a 66 6f 72 20 |e handle|rs..for |
|00001850| 6d 6f 73 74 20 36 38 30 | 78 30 20 69 6e 73 74 72 |most 680|x0 instr|
|00001860| 75 63 74 69 6f 6e 73 20 | 77 68 69 6c 65 20 6c 65 |uctions |while le|
|00001870| 61 76 69 6e 67 20 74 72 | 69 63 6b 79 20 61 6e 64 |aving tr|icky and|
|00001880| 20 75 6e 69 6d 70 6f 72 | 74 61 6e 74 0d 0a 72 61 | unimpor|tant..ra|
|00001890| 72 65 20 63 61 73 65 73 | 20 61 6c 6f 6e 65 2e 0d |re cases| alone..|
|000018a0| 0a 0d 0a 41 6c 74 68 6f | 75 67 68 20 6f 75 72 20 |...Altho|ugh our |
|000018b0| 6e 61 74 69 76 65 20 63 | 6f 64 65 20 63 6f 6d 70 |native c|ode comp|
|000018c0| 69 6c 61 74 69 6f 6e 20 | 65 6e 67 69 6e 65 20 69 |ilation |engine i|
|000018d0| 73 20 6e 6f 74 20 61 72 | 63 68 69 74 65 63 74 75 |s not ar|chitectu|
|000018e0| 72 65 2d 73 70 65 63 69 | 66 69 63 2c 0d 0a 74 6f |re-speci|fic,..to|
|000018f0| 20 64 61 74 65 20 77 65 | 20 68 61 76 65 20 6f 6e | date we| have on|
|00001900| 6c 79 20 69 6d 70 6c 65 | 6d 65 6e 74 65 64 20 61 |ly imple|mented a|
|00001910| 6e 20 38 30 78 38 36 20 | 62 61 63 6b 20 65 6e 64 |n 80x86 |back end|
|00001920| 2e 20 20 54 68 65 20 38 | 30 78 38 36 0d 0a 61 72 |. The 8|0x86..ar|
|00001930| 63 68 69 74 65 63 74 75 | 72 65 20 68 61 73 20 61 |chitectu|re has a|
|00001940| 63 68 69 65 76 65 64 20 | 73 75 63 68 20 69 6d 70 |chieved |such imp|
|00001950| 6f 72 74 61 6e 74 20 73 | 74 61 74 75 73 20 69 6e |ortant s|tatus in|
|00001960| 20 74 68 65 20 69 6e 64 | 75 73 74 72 79 0d 0a 74 | the ind|ustry..t|
|00001970| 68 61 74 20 69 74 20 6d | 61 6b 65 73 20 73 65 6e |hat it m|akes sen|
|00001980| 73 65 20 66 6f 72 20 75 | 73 20 74 6f 20 64 65 73 |se for u|s to des|
|00001990| 63 72 69 62 65 20 68 6f | 77 20 77 65 20 67 65 6e |cribe ho|w we gen|
|000019a0| 65 72 61 74 65 20 6e 61 | 74 69 76 65 20 63 6f 64 |erate na|tive cod|
|000019b0| 65 0d 0a 66 6f 72 20 69 | 74 2c 20 65 76 65 6e 20 |e..for i|t, even |
|000019c0| 74 68 6f 75 67 68 20 6d | 61 6e 79 20 6f 66 20 74 |though m|any of t|
|000019d0| 68 65 73 65 20 74 65 63 | 68 6e 69 71 75 65 73 20 |hese tec|hniques |
|000019e0| 77 6f 75 6c 64 20 6e 6f | 74 20 62 65 20 6e 65 63 |would no|t be nec|
|000019f0| 65 73 73 61 72 79 0d 0a | 6f 6e 20 52 49 53 43 20 |essary..|on RISC |
|00001a00| 61 72 63 68 69 74 65 63 | 74 75 72 65 73 2e 0d 0a |architec|tures...|
|00001a10| 0d 0a 57 65 20 61 72 65 | 20 67 6c 61 64 20 74 68 |..We are| glad th|
|00001a20| 61 74 20 77 65 20 69 6d | 70 6c 65 6d 65 6e 74 65 |at we im|plemente|
|00001a30| 64 20 74 68 65 20 6d 6f | 73 74 20 64 69 66 66 69 |d the mo|st diffi|
|00001a40| 63 75 6c 74 20 62 61 63 | 6b 20 65 6e 64 20 66 69 |cult bac|k end fi|
|00001a50| 72 73 74 2e 0d 0a 57 65 | 20 62 65 6c 69 65 76 65 |rst...We| believe|
|00001a60| 20 74 68 61 74 2c 20 77 | 65 72 65 20 77 65 20 74 | that, w|ere we t|
|00001a70| 6f 20 68 61 76 65 20 73 | 74 61 72 74 65 64 20 77 |o have s|tarted w|
|00001a80| 69 74 68 20 61 20 52 49 | 53 43 20 62 61 63 6b 20 |ith a RI|SC back |
|00001a90| 65 6e 64 2c 20 77 65 0d | 0a 77 6f 75 6c 64 20 68 |end, we.|.would h|
|00001aa0| 61 76 65 20 71 75 69 74 | 65 20 70 6f 73 73 69 62 |ave quit|e possib|
|00001ab0| 6c 79 20 61 72 63 68 69 | 74 65 63 74 65 64 20 61 |ly archi|tected a|
|00001ac0| 20 73 79 73 74 65 6d 20 | 77 68 65 72 65 20 72 65 | system |where re|
|00001ad0| 74 72 6f 66 69 74 74 69 | 6e 67 0d 0a 74 68 65 20 |trofitti|ng..the |
|00001ae0| 65 78 6f 74 69 63 20 6d | 65 63 68 61 6e 69 73 6d |exotic m|echanism|
|00001af0| 73 20 6e 65 63 65 73 73 | 61 72 79 20 66 6f 72 20 |s necess|ary for |
|00001b00| 65 66 66 69 63 69 65 6e | 74 20 38 30 78 38 36 20 |efficien|t 80x86 |
|00001b10| 73 75 70 70 6f 72 74 20 | 77 61 73 0d 0a 64 69 66 |support |was..dif|
|00001b20| 66 69 63 75 6c 74 2e 0d | 0a 0d 0a 54 68 72 65 65 |ficult..|...Three|
|00001b30| 20 6d 61 6a 6f 72 20 70 | 72 6f 62 6c 65 6d 73 20 | major p|roblems |
|00001b40| 6d 61 6b 65 20 74 72 61 | 6e 73 6c 61 74 69 6e 67 |make tra|nslating|
|00001b50| 20 36 38 30 78 30 20 63 | 6f 64 65 20 74 6f 20 38 | 680x0 c|ode to 8|
|00001b60| 30 78 38 36 20 63 6f 64 | 65 20 64 69 66 66 69 63 |0x86 cod|e diffic|
|00001b70| 75 6c 74 3a 0d 0a 0d 0a | 5c 62 65 67 69 6e 7b 65 |ult:....|\begin{e|
|00001b80| 6e 75 6d 65 72 61 74 65 | 7d 0d 0a 5c 69 74 65 6d |numerate|}..\item|
|00001b90| 20 54 68 65 20 38 30 78 | 38 36 20 68 61 73 20 6f | The 80x|86 has o|
|00001ba0| 6e 6c 79 20 38 20 72 65 | 67 69 73 74 65 72 73 2c |nly 8 re|gisters,|
|00001bb0| 20 77 68 69 6c 65 20 74 | 68 65 20 36 38 30 78 30 | while t|he 680x0|
|00001bc0| 20 68 61 73 20 31 36 2e | 0d 0a 5c 69 74 65 6d 20 | has 16.|..\item |
|00001bd0| 54 68 65 20 38 30 78 38 | 36 20 69 73 20 6c 69 74 |The 80x8|6 is lit|
|00001be0| 74 6c 65 20 65 6e 64 69 | 61 6e 2c 20 77 68 69 6c |tle endi|an, whil|
|00001bf0| 65 20 74 68 65 20 36 38 | 30 78 30 20 69 73 20 62 |e the 68|0x0 is b|
|00001c00| 69 67 20 65 6e 64 69 61 | 6e 2e 0d 0a 5c 69 74 65 |ig endia|n...\ite|
|00001c10| 6d 20 54 68 65 20 38 30 | 78 38 36 20 64 6f 65 73 |m The 80|x86 does|
|00001c20| 20 6e 6f 74 20 68 61 76 | 65 20 67 65 6e 65 72 61 | not hav|e genera|
|00001c30| 6c 2d 70 75 72 70 6f 73 | 65 20 70 6f 73 74 69 6e |l-purpos|e postin|
|00001c40| 63 72 65 6d 65 6e 74 20 | 61 6e 64 20 70 72 65 64 |crement |and pred|
|00001c50| 65 63 72 65 6d 65 6e 74 | 0d 0a 20 20 20 6f 70 65 |ecrement|.. ope|
|00001c60| 72 61 74 6f 72 73 2c 20 | 77 68 69 63 68 20 61 72 |rators, |which ar|
|00001c70| 65 20 75 73 65 64 20 66 | 72 65 71 75 65 6e 74 6c |e used f|requentl|
|00001c80| 79 20 69 6e 20 36 38 30 | 78 30 20 63 6f 64 65 2e |y in 680|x0 code.|
|00001c90| 0d 0a 5c 65 6e 64 7b 65 | 6e 75 6d 65 72 61 74 65 |..\end{e|numerate|
|00001ca0| 7d 0d 0a 0d 0a 4f 6e 20 | 74 68 65 20 6f 74 68 65 |}....On |the othe|
|00001cb0| 72 20 68 61 6e 64 2c 20 | 73 65 76 65 72 61 6c 20 |r hand, |several |
|00001cc0| 66 61 63 74 6f 72 73 20 | 6d 61 6b 65 20 74 68 65 |factors |make the|
|00001cd0| 20 6a 6f 62 20 65 61 73 | 69 65 72 3a 0d 0a 0d 0a | job eas|ier:....|
|00001ce0| 5c 62 65 67 69 6e 7b 65 | 6e 75 6d 65 72 61 74 65 |\begin{e|numerate|
|00001cf0| 7d 0d 0a 5c 69 74 65 6d | 20 54 68 65 20 38 30 78 |}..\item| The 80x|
|00001d00| 38 36 20 68 61 73 20 61 | 6c 6c 20 6f 66 20 74 68 |86 has a|ll of th|
|00001d10| 65 20 43 49 53 43 20 61 | 64 64 72 65 73 73 69 6e |e CISC a|ddressin|
|00001d20| 67 20 6d 6f 64 65 73 20 | 63 6f 6d 6d 6f 6e 6c 79 |g modes |commonly|
|00001d30| 20 75 73 65 64 20 69 6e | 20 36 38 30 78 30 20 63 | used in| 680x0 c|
|00001d40| 6f 64 65 2e 0d 0a 5c 69 | 74 65 6d 20 54 68 65 20 |ode...\i|tem The |
|00001d50| 38 30 78 38 36 20 68 61 | 73 20 43 43 20 62 69 74 |80x86 ha|s CC bit|
|00001d60| 73 20 74 68 61 74 20 6d | 61 70 20 64 69 72 65 63 |s that m|ap direc|
|00001d70| 74 6c 79 20 74 6f 20 74 | 68 65 69 72 20 36 38 30 |tly to t|heir 680|
|00001d80| 78 30 20 63 6f 75 6e 74 | 65 72 70 61 72 74 73 0d |x0 count|erparts.|
|00001d90| 0a 20 20 20 28 65 78 63 | 65 70 74 20 66 6f 72 20 |. (exc|ept for |
|00001da0| 74 68 65 20 36 38 30 78 | 30 27 73 20 58 20 62 69 |the 680x|0's X bi|
|00001db0| 74 29 2e 0d 0a 5c 69 74 | 65 6d 20 54 68 65 20 38 |t)...\it|em The 8|
|00001dc0| 30 78 38 36 20 73 75 70 | 70 6f 72 74 73 20 38 2d |0x86 sup|ports 8-|
|00001dd0| 2c 20 31 36 2d 20 61 6e | 64 20 33 32 2d 62 69 74 |, 16- an|d 32-bit|
|00001de0| 20 6f 70 65 72 61 74 69 | 6f 6e 73 2c 20 28 61 6c | operati|ons, (al|
|00001df0| 74 68 6f 75 67 68 20 69 | 74 20 63 61 6e 20 6f 6e |though i|t can on|
|00001e00| 6c 79 0d 0a 20 20 20 73 | 75 70 70 6f 72 74 20 38 |ly.. s|upport 8|
|00001e10| 20 62 69 74 20 6f 70 65 | 72 61 74 69 6f 6e 73 20 | bit ope|rations |
|00001e20| 6f 6e 20 66 6f 75 72 20 | 6f 66 20 69 74 73 20 72 |on four |of its r|
|00001e30| 65 67 69 73 74 65 72 73 | 29 2e 0d 0a 5c 69 74 65 |egisters|)...\ite|
|00001e40| 6d 20 54 68 65 20 38 30 | 78 38 36 20 61 6e 64 20 |m The 80|x86 and |
|00001e50| 36 38 30 78 30 20 68 61 | 76 65 20 61 6e 61 6c 61 |680x0 ha|ve anala|
|00001e60| 67 6f 75 73 20 63 6f 6e | 64 69 74 69 6f 6e 61 6c |gous con|ditional|
|00001e70| 20 62 72 61 6e 63 68 20 | 69 6e 73 74 72 75 63 74 | branch |instruct|
|00001e80| 69 6f 6e 73 2e 0d 0a 5c | 69 74 65 6d 20 54 68 65 |ions...\|item The|
|00001e90| 20 38 30 78 38 36 20 61 | 6c 6c 6f 77 73 20 75 6e | 80x86 a|llows un|
|00001ea0| 61 6c 69 67 6e 65 64 20 | 6d 65 6d 6f 72 79 20 61 |aligned |memory a|
|00001eb0| 63 63 65 73 73 65 73 20 | 77 69 74 68 6f 75 74 20 |ccesses |without |
|00001ec0| 73 75 62 73 74 61 6e 74 | 69 61 6c 20 6f 76 65 72 |substant|ial over|
|00001ed0| 68 65 61 64 2e 0d 0a 5c | 65 6e 64 7b 65 6e 75 6d |head...\|end{enum|
|00001ee0| 65 72 61 74 65 7d 0d 0a | 0d 0a 54 68 65 20 74 6f |erate}..|..The to|
|00001ef0| 75 67 68 65 73 74 20 70 | 72 6f 62 6c 65 6d 20 69 |ughest p|roblem i|
|00001f00| 73 20 74 68 65 20 6c 61 | 63 6b 20 6f 66 20 72 65 |s the la|ck of re|
|00001f10| 67 69 73 74 65 72 73 2e | 20 20 4f 6e 20 33 32 2d |gisters.| On 32-|
|00001f20| 72 65 67 69 73 74 65 72 | 20 52 49 53 43 0d 0a 61 |register| RISC..a|
|00001f30| 72 63 68 69 74 65 63 74 | 75 72 65 73 20 69 74 27 |rchitect|ures it'|
|00001f40| 73 20 65 61 73 79 20 74 | 6f 20 61 6c 6c 6f 63 61 |s easy t|o alloca|
|00001f50| 74 65 20 6f 6e 65 20 52 | 49 53 43 20 72 65 67 69 |te one R|ISC regi|
|00001f60| 73 74 65 72 20 66 6f 72 | 20 65 61 63 68 0d 0a 36 |ster for| each..6|
|00001f70| 38 30 78 30 20 72 65 67 | 69 73 74 65 72 2c 20 62 |80x0 reg|ister, b|
|00001f80| 75 74 20 6f 6e 20 74 68 | 65 20 38 30 78 38 36 20 |ut on th|e 80x86 |
|00001f90| 61 20 64 69 66 66 65 72 | 65 6e 74 20 61 70 70 72 |a differ|ent appr|
|00001fa0| 6f 61 63 68 20 69 73 20 | 6e 65 65 64 65 64 2e 0d |oach is |needed..|
|00001fb0| 0a 54 68 65 20 6f 62 76 | 69 6f 75 73 20 73 6f 6c |.The obv|ious sol|
|00001fc0| 75 74 69 6f 6e 20 69 73 | 20 74 6f 20 70 65 72 66 |ution is| to perf|
|00001fd0| 6f 72 6d 20 66 75 6c 6c | 2d 62 6c 6f 77 6e 20 69 |orm full|-blown i|
|00001fe0| 6e 74 65 72 2d 62 6c 6f | 63 6b 20 72 65 67 69 73 |nter-blo|ck regis|
|00001ff0| 74 65 72 0d 0a 61 6c 6c | 6f 63 61 74 69 6f 6e 2c |ter..all|ocation,|
|00002000| 20 62 75 74 20 77 65 20 | 66 65 61 72 20 74 68 61 | but we |fear tha|
|00002010| 74 20 75 73 69 6e 67 20 | 74 72 61 64 69 74 69 6f |t using |traditio|
|00002020| 6e 61 6c 20 63 6f 6d 70 | 69 6c 65 72 20 74 65 63 |nal comp|iler tec|
|00002030| 68 6e 69 71 75 65 73 0d | 0a 77 6f 75 6c 64 20 62 |hniques.|.would b|
|00002040| 65 20 75 6e 61 63 63 65 | 70 74 61 62 6c 79 20 73 |e unacce|ptably s|
|00002050| 6c 6f 77 2e 0d 0a 0d 0a | 46 6f 72 20 6e 6f 77 2c |low.....|For now,|
|00002060| 20 77 65 20 68 61 76 65 | 20 61 64 6f 70 74 65 64 | we have| adopted|
|00002070| 20 61 20 73 69 6d 70 6c | 65 20 63 6f 6e 73 74 72 | a simpl|e constr|
|00002080| 61 69 6e 74 3a 20 62 65 | 74 77 65 65 6e 20 62 61 |aint: be|tween ba|
|00002090| 73 69 63 20 62 6c 6f 63 | 6b 73 2c 0d 0a 61 6c 6c |sic bloc|ks,..all|
|000020a0| 20 72 65 67 69 73 74 65 | 72 73 20 61 6e 64 20 6c | registe|rs and l|
|000020b0| 69 76 65 20 43 43 20 62 | 69 74 73 20 6d 75 73 74 |ive CC b|its must|
|000020c0| 20 72 65 73 69 64 65 20 | 69 6e 20 74 68 65 69 72 | reside |in their|
|000020d0| 20 63 61 6e 6f 6e 69 63 | 61 6c 20 68 6f 6d 65 0d | canonic|al home.|
|000020e0| 0a 69 6e 20 6d 65 6d 6f | 72 79 2e 20 20 57 69 74 |.in memo|ry. Wit|
|000020f0| 68 69 6e 20 61 20 62 6c | 6f 63 6b 2c 20 61 6e 79 |hin a bl|ock, any|
|00002100| 74 68 69 6e 67 20 67 6f | 65 73 2e 20 20 53 6f 20 |thing go|es. So |
|00002110| 77 68 61 74 20 6c 69 62 | 65 72 74 69 65 73 20 64 |what lib|erties d|
|00002120| 6f 65 73 0d 0a 73 79 6e | 36 38 6b 20 74 61 6b 65 |oes..syn|68k take|
|00002130| 20 77 69 74 68 69 6e 20 | 61 20 62 6c 6f 63 6b 3f | within |a block?|
|00002140| 0d 0a 0d 0a 54 68 65 20 | 38 30 78 38 36 20 72 65 |....The |80x86 re|
|00002150| 67 69 73 74 65 72 20 73 | 65 74 20 69 73 20 74 72 |gister s|et is tr|
|00002160| 65 61 74 65 64 20 61 73 | 20 61 20 63 61 63 68 65 |eated as| a cache|
|00002170| 20 66 6f 72 20 72 65 63 | 65 6e 74 6c 79 20 75 73 | for rec|ently us|
|00002180| 65 64 0d 0a 36 38 30 78 | 30 20 72 65 67 69 73 74 |ed..680x|0 regist|
|00002190| 65 72 73 2c 20 61 6e 64 | 20 74 68 65 20 38 30 78 |ers, and| the 80x|
|000021a0| 38 36 20 43 43 20 62 69 | 74 73 20 61 72 65 20 75 |86 CC bi|ts are u|
|000021b0| 73 65 64 20 61 73 20 61 | 20 63 61 63 68 65 20 66 |sed as a| cache f|
|000021c0| 6f 72 20 74 68 65 0d 0a | 36 38 30 78 30 20 43 43 |or the..|680x0 CC|
|000021d0| 20 62 69 74 73 2e 20 20 | 41 74 20 61 6e 79 20 70 | bits. |At any p|
|000021e0| 61 72 74 69 63 75 6c 61 | 72 20 70 6f 69 6e 74 20 |articula|r point |
|000021f0| 77 69 74 68 69 6e 20 61 | 20 62 6c 6f 63 6b 2c 20 |within a| block, |
|00002200| 65 61 63 68 20 36 38 30 | 78 30 0d 0a 72 65 67 69 |each 680|x0..regi|
|00002210| 73 74 65 72 20 69 73 20 | 65 69 74 68 65 72 20 73 |ster is |either s|
|00002220| 69 74 74 69 6e 67 20 69 | 6e 20 69 74 73 20 6d 65 |itting i|n its me|
|00002230| 6d 6f 72 79 20 68 6f 6d | 65 20 6f 72 20 69 73 20 |mory hom|e or is |
|00002240| 63 61 63 68 65 64 20 69 | 6e 20 61 6e 0d 0a 38 30 |cached i|n an..80|
|00002250| 78 38 36 20 72 65 67 69 | 73 74 65 72 2c 20 61 6e |x86 regi|ster, an|
|00002260| 64 20 65 61 63 68 20 6c | 69 76 65 20 36 38 30 78 |d each l|ive 680x|
|00002270| 30 20 43 43 20 62 69 74 | 20 69 73 20 65 69 74 68 |0 CC bit| is eith|
|00002280| 65 72 20 63 61 63 68 65 | 64 20 69 6e 20 69 74 73 |er cache|d in its|
|00002290| 0d 0a 38 30 78 38 36 20 | 65 71 75 69 76 61 6c 65 |..80x86 |equivale|
|000022a0| 6e 74 20 6f 72 20 73 74 | 6f 72 65 64 20 69 6e 20 |nt or st|ored in |
|000022b0| 69 74 73 20 6d 65 6d 6f | 72 79 20 68 6f 6d 65 2e |its memo|ry home.|
|000022c0| 20 20 43 61 63 68 65 64 | 20 72 65 67 69 73 74 65 | Cached| registe|
|000022d0| 72 73 0d 0a 6d 61 79 20 | 62 65 20 69 6e 20 63 61 |rs..may |be in ca|
|000022e0| 6e 6f 6e 69 63 61 6c 20 | 66 6f 72 6d 2c 20 6d 61 |nonical |form, ma|
|000022f0| 79 20 62 65 20 62 79 74 | 65 20 73 77 61 70 70 65 |y be byt|e swappe|
|00002300| 64 2c 20 6d 61 79 20 68 | 61 76 65 20 6f 6e 6c 79 |d, may h|ave only|
|00002310| 20 74 68 65 69 72 0d 0a | 6c 6f 77 20 74 77 6f 20 | their..|low two |
|00002320| 62 79 74 65 73 20 73 77 | 61 70 70 65 64 2c 20 6f |bytes sw|apped, o|
|00002330| 72 20 6d 61 79 20 62 65 | 20 6f 66 66 73 65 74 20 |r may be| offset |
|00002340| 62 79 20 61 20 6b 6e 6f | 77 6e 20 63 6f 6e 73 74 |by a kno|wn const|
|00002350| 61 6e 74 20 66 72 6f 6d | 0d 0a 74 68 65 69 72 20 |ant from|..their |
|00002360| 61 63 74 75 61 6c 20 76 | 61 6c 75 65 2e 0d 0a 0d |actual v|alue....|
|00002370| 0a 45 61 63 68 20 36 38 | 30 78 30 20 69 6e 73 74 |.Each 68|0x0 inst|
|00002380| 72 75 63 74 69 6f 6e 20 | 63 61 6e 20 72 65 71 75 |ruction |can requ|
|00002390| 69 72 65 20 74 68 61 74 | 20 36 38 30 78 30 20 72 |ire that| 680x0 r|
|000023a0| 65 67 69 73 74 65 72 73 | 20 62 65 20 63 61 63 68 |egisters| be cach|
|000023b0| 65 64 0d 0a 69 6e 20 70 | 61 72 74 69 63 75 6c 61 |ed..in p|articula|
|000023c0| 72 20 77 61 79 73 3b 20 | 74 68 65 20 63 6f 6d 70 |r ways; |the comp|
|000023d0| 69 6c 61 74 69 6f 6e 20 | 65 6e 67 69 6e 65 20 67 |ilation |engine g|
|000023e0| 65 6e 65 72 61 74 65 73 | 20 74 68 65 20 6d 69 6e |enerates| the min|
|000023f0| 69 6d 61 6c 0d 0a 63 6f | 64 65 20 6e 65 65 64 65 |imal..co|de neede|
|00002400| 64 20 74 6f 20 73 61 74 | 69 73 66 79 20 74 68 6f |d to sat|isfy tho|
|00002410| 73 65 20 63 6f 6e 73 74 | 72 61 69 6e 74 73 20 61 |se const|raints a|
|00002420| 6e 64 20 74 68 65 6e 20 | 63 61 6c 6c 73 20 61 20 |nd then |calls a |
|00002430| 73 65 71 75 65 6e 63 65 | 0d 0a 6f 66 20 72 6f 75 |sequence|..of rou|
|00002440| 74 69 6e 65 73 20 74 6f | 20 67 65 6e 65 72 61 74 |tines to| generat|
|00002450| 65 20 74 68 65 20 6e 61 | 74 69 76 65 20 63 6f 64 |e the na|tive cod|
|00002460| 65 2e 20 20 41 73 20 65 | 61 63 68 20 36 38 30 78 |e. As e|ach 680x|
|00002470| 30 20 69 6e 73 74 72 75 | 63 74 69 6f 6e 0d 0a 69 |0 instru|ction..i|
|00002480| 73 20 70 72 6f 63 65 73 | 73 65 64 2c 20 65 61 63 |s proces|sed, eac|
|00002490| 68 20 36 38 30 78 30 20 | 72 65 67 69 73 74 65 72 |h 680x0 |register|
|000024a0| 27 73 20 63 61 63 68 65 | 20 73 74 61 74 75 73 20 |'s cache| status |
|000024b0| 69 73 20 75 70 64 61 74 | 65 64 2e 20 20 44 69 72 |is updat|ed. Dir|
|000024c0| 74 79 0d 0a 72 65 67 69 | 73 74 65 72 73 20 61 72 |ty..regi|sters ar|
|000024d0| 65 20 63 61 6e 6f 6e 69 | 63 61 6c 69 7a 65 64 20 |e canoni|calized |
|000024e0| 61 6e 64 20 73 70 69 6c | 6c 65 64 20 62 61 63 6b |and spil|led back|
|000024f0| 20 74 6f 20 6d 65 6d 6f | 72 79 20 61 74 20 74 68 | to memo|ry at th|
|00002500| 65 20 65 6e 64 0d 0a 6f | 66 20 65 61 63 68 20 62 |e end..o|f each b|
|00002510| 6c 6f 63 6b 20 28 6f 72 | 20 77 68 65 6e 20 77 65 |lock (or| when we|
|00002520| 20 72 75 6e 20 6f 75 74 | 20 6f 66 20 38 30 78 38 | run out| of 80x8|
|00002530| 36 20 72 65 67 69 73 74 | 65 72 73 20 61 6e 64 20 |6 regist|ers and |
|00002540| 77 65 20 6e 65 65 64 0d | 0a 74 6f 20 6d 61 6b 65 |we need.|.to make|
|00002550| 20 72 6f 6f 6d 29 2e 0d | 0a 0d 0a 57 65 20 61 6c | room)..|...We al|
|00002560| 6c 6f 77 20 36 38 30 78 | 30 20 72 65 67 69 73 74 |low 680x|0 regist|
|00002570| 65 72 73 20 74 6f 20 62 | 65 20 63 61 63 68 65 64 |ers to b|e cached|
|00002580| 20 77 69 74 68 20 76 61 | 72 79 69 6e 67 20 62 79 | with va|rying by|
|00002590| 74 65 20 6f 72 64 65 72 | 73 20 61 6e 64 0d 0a 6f |te order|s and..o|
|000025a0| 66 66 73 65 74 73 20 73 | 6f 20 74 68 61 74 20 77 |ffsets s|o that w|
|000025b0| 65 20 63 61 6e 20 70 65 | 72 66 6f 72 6d 20 74 68 |e can pe|rform th|
|000025c0| 65 20 6f 70 74 69 6d 69 | 7a 61 74 69 6f 6e 73 20 |e optimi|zations |
|000025d0| 6f 66 20 6c 61 7a 79 20 | 62 79 74 65 0d 0a 73 77 |of lazy |byte..sw|
|000025e0| 61 70 70 69 6e 67 20 61 | 6e 64 20 6c 61 7a 79 20 |apping a|nd lazy |
|000025f0| 63 6f 6e 73 74 61 6e 74 | 20 6f 66 66 73 65 74 74 |constant| offsett|
|00002600| 69 6e 67 2e 20 20 49 66 | 20 74 68 65 20 36 38 30 |ing. If| the 680|
|00002610| 78 30 20 70 72 6f 67 72 | 61 6d 20 6c 6f 61 64 73 |x0 progr|am loads|
|00002620| 0d 0a 61 20 72 65 67 69 | 73 74 65 72 20 66 72 6f |..a regi|ster fro|
|00002630| 6d 20 6d 65 6d 6f 72 79 | 20 61 6e 64 20 74 68 65 |m memory| and the|
|00002640| 6e 20 65 6e 64 73 20 75 | 70 20 77 72 69 74 69 6e |n ends u|p writin|
|00002650| 67 20 69 74 20 6f 75 74 | 20 6c 61 74 65 72 2c 20 |g it out| later, |
|00002660| 77 65 0d 0a 61 76 6f 69 | 64 20 75 6e 6e 65 63 65 |we..avoi|d unnece|
|00002670| 73 73 61 72 79 20 62 79 | 74 65 20 73 77 61 70 73 |ssary by|te swaps|
|00002680| 20 62 79 20 6e 6f 74 20 | 63 61 6e 6f 6e 69 63 61 | by not |canonica|
|00002690| 6c 69 7a 69 6e 67 20 74 | 68 65 20 76 61 6c 75 65 |lizing t|he value|
|000026a0| 0d 0a 69 6d 6d 65 64 69 | 61 74 65 6c 79 2e 20 20 |..immedi|ately. |
|000026b0| 4c 61 7a 79 20 63 6f 6e | 73 74 61 6e 74 20 6f 66 |Lazy con|stant of|
|000026c0| 66 73 65 74 74 69 6e 67 | 20 6d 69 74 69 67 61 74 |fsetting| mitigat|
|000026d0| 65 73 20 74 68 65 20 6f | 76 65 72 68 65 61 64 20 |es the o|verhead |
|000026e0| 6f 66 0d 0a 70 6f 73 74 | 69 6e 63 72 65 6d 65 6e |of..post|incremen|
|000026f0| 74 20 61 6e 64 20 70 72 | 65 64 65 63 72 65 6d 65 |t and pr|edecreme|
|00002700| 6e 74 20 73 69 64 65 20 | 65 66 66 65 63 74 73 2e |nt side |effects.|
|00002710| 20 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 74 | For ex|ample, t|
|00002720| 68 69 73 0d 0a 36 38 30 | 78 30 20 63 6f 64 65 3a |his..680|x0 code:|
|00002730| 0d 0a 0d 0a 5c 62 65 67 | 69 6e 7b 76 65 72 62 61 |....\beg|in{verba|
|00002740| 74 69 6d 7d 0d 0a 09 70 | 65 61 09 09 30 78 31 0d |tim}...p|ea..0x1.|
|00002750| 0a 09 70 65 61 09 09 30 | 78 32 0d 0a 09 70 65 61 |..pea..0|x2...pea|
|00002760| 09 09 30 78 33 0d 0a 09 | 70 65 61 09 09 30 78 34 |..0x3...|pea..0x4|
|00002770| 0d 0a 09 2e 2e 2e 0d 0a | 5c 65 6e 64 7b 76 65 72 |........|\end{ver|
|00002780| 62 61 74 69 6d 7d 0d 0a | 0d 0a 62 65 63 6f 6d 65 |batim}..|..become|
|00002790| 73 20 74 68 69 73 20 38 | 30 78 38 36 20 63 6f 64 |s this 8|0x86 cod|
|000027a0| 65 3a 0d 0a 0d 0a 5c 62 | 65 67 69 6e 7b 76 65 72 |e:....\b|egin{ver|
|000027b0| 62 61 74 69 6d 7d 0d 0a | 09 6d 6f 76 6c 09 5f 61 |batim}..|.movl._a|
|000027c0| 37 2c 25 65 64 69 0d 0a | 09 6d 6f 76 6c 09 24 30 |7,%edi..|.movl.$0|
|000027d0| 78 30 31 30 30 30 30 30 | 30 2c 2d 34 28 25 65 64 |x0100000|0,-4(%ed|
|000027e0| 69 29 09 3b 20 22 70 75 | 73 68 22 20 62 69 67 2d |i).; "pu|sh" big-|
|000027f0| 65 6e 64 69 61 6e 20 63 | 6f 6e 73 74 61 6e 74 0d |endian c|onstant.|
|00002800| 0a 09 6d 6f 76 6c 09 24 | 30 78 30 32 30 30 30 30 |..movl.$|0x020000|
|00002810| 30 30 2c 2d 38 28 25 65 | 64 69 29 0d 0a 09 6d 6f |00,-8(%e|di)...mo|
|00002820| 76 6c 09 24 30 78 30 33 | 30 30 30 30 30 30 2c 2d |vl.$0x03|000000,-|
|00002830| 31 32 28 25 65 64 69 29 | 0d 0a 09 6d 6f 76 6c 09 |12(%edi)|...movl.|
|00002840| 24 30 78 30 34 30 30 30 | 30 30 30 2c 2d 31 36 28 |$0x04000|000,-16(|
|00002850| 25 65 64 69 29 0d 0a 09 | 2e 2e 2e 20 3c 6d 6f 72 |%edi)...|... <mor|
|00002860| 65 20 75 73 65 73 20 6f | 66 20 61 37 20 6d 61 79 |e uses o|f a7 may|
|00002870| 20 66 6f 6c 6c 6f 77 2c | 20 61 6e 64 20 74 68 65 | follow,| and the|
|00002880| 79 27 6c 6c 20 75 73 65 | 20 25 65 64 69 3e 0d 0a |y'll use| %edi>..|
|00002890| 09 73 75 62 6c 09 24 31 | 36 2c 25 65 64 69 0d 0a |.subl.$1|6,%edi..|
|000028a0| 09 6d 6f 76 6c 09 24 65 | 64 69 2c 5f 61 37 0d 0a |.movl.$e|di,_a7..|
|000028b0| 09 2e 2e 2e 0d 0a 5c 65 | 6e 64 7b 76 65 72 62 61 |......\e|nd{verba|
|000028c0| 74 69 6d 7d 0d 0a 0d 0a | 41 73 20 6d 65 6e 74 69 |tim}....|As menti|
|000028d0| 6f 6e 65 64 20 61 62 6f | 76 65 2c 20 77 65 20 75 |oned abo|ve, we u|
|000028e0| 73 65 20 74 68 65 20 38 | 30 78 38 36 20 63 6f 6e |se the 8|0x86 con|
|000028f0| 64 69 74 69 6f 6e 20 63 | 6f 64 65 20 62 69 74 73 |dition c|ode bits|
|00002900| 20 61 73 20 61 20 63 61 | 63 68 65 0d 0a 66 6f 72 | as a ca|che..for|
|00002910| 20 74 68 65 20 72 65 61 | 6c 20 36 38 30 78 30 20 | the rea|l 680x0 |
|00002920| 43 43 20 62 69 74 73 2e | 20 20 41 6c 74 68 6f 75 |CC bits.| Althou|
|00002930| 67 68 20 6c 69 76 65 20 | 63 61 63 68 65 64 20 43 |gh live |cached C|
|00002940| 43 20 62 69 74 73 20 61 | 72 65 0d 0a 6f 63 63 61 |C bits a|re..occa|
|00002950| 73 69 6f 6e 61 6c 6c 79 | 20 73 70 69 6c 6c 65 64 |sionally| spilled|
|00002960| 20 62 61 63 6b 20 74 6f | 20 6d 65 6d 6f 72 79 20 | back to| memory |
|00002970| 62 65 63 61 75 73 65 20 | 73 6f 6d 65 20 38 30 78 |because |some 80x|
|00002980| 38 36 20 69 6e 73 74 72 | 75 63 74 69 6f 6e 0d 0a |86 instr|uction..|
|00002990| 69 73 20 61 62 6f 75 74 | 20 74 6f 20 63 6c 6f 62 |is about| to clob|
|000029a0| 62 65 72 20 74 68 65 6d | 2c 20 74 68 69 73 20 74 |ber them|, this t|
|000029b0| 72 69 63 6b 20 61 6c 6d | 6f 73 74 20 61 6c 77 61 |rick alm|ost alwa|
|000029c0| 79 73 20 77 6f 72 6b 73 | 2e 20 20 55 73 69 6e 67 |ys works|. Using|
|000029d0| 0d 0a 38 30 78 38 36 20 | 43 43 20 62 69 74 73 2c |..80x86 |CC bits,|
|000029e0| 20 77 65 20 63 61 6e 20 | 66 72 65 71 75 65 6e 74 | we can |frequent|
|000029f0| 6c 79 20 67 65 74 20 61 | 77 61 79 20 77 69 74 68 |ly get a|way with|
|00002a00| 20 65 78 74 72 65 6d 65 | 6c 79 20 63 6f 6e 63 69 | extreme|ly conci|
|00002a10| 73 65 0d 0a 63 6f 64 65 | 20 73 65 71 75 65 6e 63 |se..code| sequenc|
|00002a20| 65 73 3b 20 66 6f 72 20 | 65 78 61 6d 70 6c 65 2c |es; for |example,|
|00002a30| 20 61 20 36 38 30 78 30 | 20 63 6f 6d 70 61 72 65 | a 680x0| compare|
|00002a40| 20 61 6e 64 20 63 6f 6e | 64 69 74 69 6f 6e 61 6c | and con|ditional|
|00002a50| 20 62 72 61 6e 63 68 0d | 0a 62 65 63 6f 6d 65 73 | branch.|.becomes|
|00002a60| 20 61 6e 20 38 30 78 38 | 36 20 63 6f 6d 70 61 72 | an 80x8|6 compar|
|00002a70| 65 20 61 6e 64 20 63 6f | 6e 64 69 74 69 6f 6e 61 |e and co|nditiona|
|00002a80| 6c 20 62 72 61 6e 63 68 | 2e 0d 0a 0d 0a 5c 73 65 |l branch|.....\se|
|00002a90| 63 74 69 6f 6e 7b 53 65 | 6c 66 2d 6d 6f 64 69 66 |ction{Se|lf-modif|
|00002aa0| 79 69 6e 67 20 63 6f 64 | 65 7d 0d 0a 0d 0a 4c 69 |ying cod|e}....Li|
|00002ab0| 6b 65 20 6d 6f 73 74 20 | 64 79 6e 61 6d 69 63 61 |ke most |dynamica|
|00002ac0| 6c 6c 79 20 63 6f 6d 70 | 69 6c 69 6e 67 20 65 6d |lly comp|iling em|
|00002ad0| 75 6c 61 74 6f 72 73 2c | 20 73 79 6e 36 38 6b 20 |ulators,| syn68k |
|00002ae0| 64 6f 65 73 6e 27 74 20 | 64 65 74 65 63 74 0d 0a |doesn't |detect..|
|00002af0| 73 65 6c 66 2d 6d 6f 64 | 69 66 79 69 6e 67 20 63 |self-mod|ifying c|
|00002b00| 6f 64 65 3b 20 74 68 65 | 20 6f 76 65 72 68 65 61 |ode; the| overhea|
|00002b10| 64 20 69 73 20 74 6f 6f | 20 68 69 67 68 2e 20 20 |d is too| high. |
|00002b20| 46 6f 72 74 75 6e 61 74 | 65 6c 79 2c 0d 0a 73 65 |Fortunat|ely,..se|
|00002b30| 6c 66 2d 6d 6f 64 69 66 | 79 69 6e 67 20 70 72 6f |lf-modif|ying pro|
|00002b40| 67 72 61 6d 73 20 64 6f | 6e 27 74 20 77 6f 72 6b |grams do|n't work|
|00002b50| 20 6f 6e 20 74 68 65 20 | 72 65 61 6c 20 36 38 30 | on the |real 680|
|00002b60| 34 30 20 65 69 74 68 65 | 72 2e 20 20 57 65 0d 0a |40 eithe|r. We..|
|00002b70| 72 65 6c 79 20 6f 6e 20 | 74 68 65 20 70 72 6f 67 |rely on |the prog|
|00002b80| 72 61 6d 20 6d 61 6b 69 | 6e 67 20 65 78 70 6c 69 |ram maki|ng expli|
|00002b90| 63 69 74 20 73 79 73 74 | 65 6d 20 63 61 6c 6c 73 |cit syst|em calls|
|00002ba0| 20 74 6f 20 66 6c 75 73 | 68 20 74 68 65 20 63 61 | to flus|h the ca|
|00002bb0| 63 68 65 73 0d 0a 77 68 | 65 6e 65 76 65 72 20 36 |ches..wh|enever 6|
|00002bc0| 38 30 78 30 20 63 6f 64 | 65 20 6d 61 79 20 68 61 |80x0 cod|e may ha|
|00002bd0| 76 65 20 62 65 65 6e 20 | 6d 6f 64 69 66 69 65 64 |ve been |modified|
|00002be0| 20 6f 72 20 63 72 65 61 | 74 65 64 2e 20 20 53 6f | or crea|ted. So|
|00002bf0| 6d 65 20 70 72 6f 67 72 | 61 6d 73 0d 0a 28 6c 69 |me progr|ams..(li|
|00002c00| 6b 65 20 48 79 70 65 72 | 43 61 72 64 29 20 66 6c |ke Hyper|Card) fl|
|00002c10| 75 73 68 20 74 68 65 20 | 63 61 63 68 65 73 20 76 |ush the |caches v|
|00002c20| 65 72 79 20 6f 66 74 65 | 6e 2c 20 77 68 69 63 68 |ery ofte|n, which|
|00002c30| 20 63 61 6e 20 63 61 75 | 73 65 20 72 65 61 6c 0d | can cau|se real.|
|00002c40| 0a 70 65 72 66 6f 72 6d | 61 6e 63 65 20 68 65 61 |.perform|ance hea|
|00002c50| 64 61 63 68 65 73 20 69 | 66 20 63 6f 64 65 20 69 |daches i|f code i|
|00002c60| 73 20 63 6f 6e 74 69 6e | 75 6f 75 73 6c 79 20 72 |s contin|uously r|
|00002c70| 65 63 6f 6d 70 69 6c 65 | 64 2e 20 20 57 65 20 68 |ecompile|d. We h|
|00002c80| 61 76 65 0d 0a 73 6f 6c | 76 65 64 20 74 68 69 73 |ave..sol|ved this|
|00002c90| 20 70 72 6f 62 6c 65 6d | 20 62 79 20 63 68 65 63 | problem| by chec|
|00002ca0| 6b 73 75 6d 6d 69 6e 67 | 20 36 38 30 78 30 20 62 |ksumming| 680x0 b|
|00002cb0| 6c 6f 63 6b 73 20 61 73 | 20 74 68 65 79 20 61 72 |locks as| they ar|
|00002cc0| 65 20 63 6f 6d 70 69 6c | 65 64 0d 0a 61 6e 64 20 |e compil|ed..and |
|00002cd0| 6f 6e 6c 79 20 64 65 63 | 6f 6d 70 69 6c 69 6e 67 |only dec|ompiling|
|00002ce0| 20 62 6c 6f 63 6b 73 20 | 77 68 69 63 68 20 66 61 | blocks |which fa|
|00002cf0| 69 6c 20 74 68 65 69 72 | 20 63 68 65 63 6b 73 75 |il their| checksu|
|00002d00| 6d 73 2e 20 20 54 68 69 | 73 0d 0a 6f 70 74 69 6d |ms. Thi|s..optim|
|00002d10| 69 7a 61 74 69 6f 6e 20 | 61 6c 6f 6e 65 20 73 70 |ization |alone sp|
|00002d20| 65 64 20 75 70 20 73 6f | 6d 65 20 48 79 70 65 72 |ed up so|me Hyper|
|00002d30| 43 61 72 64 20 73 74 61 | 63 6b 73 20 62 79 20 61 |Card sta|cks by a|
|00002d40| 20 66 61 63 74 6f 72 20 | 6f 66 0d 0a 74 68 72 65 | factor |of..thre|
|00002d50| 65 20 6f 72 20 73 6f 2e | 0d 0a 0d 0a 5c 73 65 63 |e or so.|....\sec|
|00002d60| 74 69 6f 6e 7b 52 65 73 | 70 6f 6e 73 69 76 65 6e |tion{Res|ponsiven|
|00002d70| 65 73 73 7d 0d 0a 0d 0a | 52 65 73 70 6f 6e 73 69 |ess}....|Responsi|
|00002d80| 76 65 6e 65 73 73 20 69 | 73 20 61 20 63 6f 6e 63 |veness i|s a conc|
|00002d90| 65 72 6e 20 66 6f 72 20 | 61 6e 79 20 64 79 6e 61 |ern for |any dyna|
|00002da0| 6d 69 63 20 63 6f 6d 70 | 69 6c 65 72 2e 20 20 46 |mic comp|iler. F|
|00002db0| 6f 72 74 75 6e 61 74 65 | 6c 79 2c 0d 0a 73 79 6e |ortunate|ly,..syn|
|00002dc0| 36 38 6b 20 69 73 20 6c | 61 72 67 65 6c 79 20 64 |68k is l|argely d|
|00002dd0| 72 69 76 65 6e 20 62 79 | 20 61 75 74 6f 6d 61 74 |riven by| automat|
|00002de0| 69 63 61 6c 6c 79 20 67 | 65 6e 65 72 61 74 65 64 |ically g|enerated|
|00002df0| 20 6c 6f 6f 6b 75 70 20 | 74 61 62 6c 65 73 0d 0a | lookup |tables..|
|00002e00| 73 6f 20 63 6f 6d 70 69 | 6c 61 74 69 6f 6e 20 73 |so compi|lation s|
|00002e10| 70 65 65 64 20 69 73 20 | 67 6f 6f 64 2e 20 20 4c |peed is |good. L|
|00002e20| 69 6b 65 20 6f 74 68 65 | 72 20 64 79 6e 61 6d 69 |ike othe|r dynami|
|00002e30| 63 20 63 6f 6d 70 69 6c | 65 72 73 2c 20 73 79 6e |c compil|ers, syn|
|00002e40| 36 38 6b 0d 0a 6f 6e 6c | 79 20 62 6f 74 68 65 72 |68k..onl|y bother|
|00002e50| 73 20 74 6f 20 63 6f 6d | 70 69 6c 65 20 36 38 30 |s to com|pile 680|
|00002e60| 78 30 20 63 6f 64 65 20 | 77 68 65 6e 20 69 74 20 |x0 code |when it |
|00002e70| 65 6e 63 6f 75 6e 74 65 | 72 73 20 69 74 20 66 6f |encounte|rs it fo|
|00002e80| 72 20 74 68 65 0d 0a 66 | 69 72 73 74 20 74 69 6d |r the..f|irst tim|
|00002e90| 65 2e 0d 0a 0d 0a 57 68 | 65 6e 20 73 79 6e 36 38 |e.....Wh|en syn68|
|00002ea0| 6b 20 65 6e 63 6f 75 6e | 74 65 72 73 20 6e 65 77 |k encoun|ters new|
|00002eb0| 20 63 6f 64 65 2c 20 69 | 74 20 63 6f 6d 70 69 6c | code, i|t compil|
|00002ec0| 65 73 20 6f 74 68 65 72 | 20 36 38 30 78 30 20 63 |es other| 680x0 c|
|00002ed0| 6f 64 65 20 74 68 61 74 | 0d 0a 69 74 20 63 61 6e |ode that|..it can|
|00002ee0| 20 72 65 61 63 68 20 66 | 72 6f 6d 20 74 68 65 72 | reach f|rom ther|
|00002ef0| 65 20 62 75 74 20 64 6f | 65 73 20 6e 6f 74 20 63 |e but do|es not c|
|00002f00| 6f 6d 70 69 6c 65 20 74 | 68 72 6f 75 67 68 20 6a |ompile t|hrough j|
|00002f10| 73 72 27 73 2e 20 20 4f | 6e 6c 79 0d 0a 77 68 65 |sr's. O|nly..whe|
|00002f20| 6e 20 61 20 6a 73 72 20 | 69 73 20 61 63 74 75 61 |n a jsr |is actua|
|00002f30| 6c 6c 79 20 65 78 65 63 | 75 74 65 64 20 64 6f 65 |lly exec|uted doe|
|00002f40| 73 20 73 79 6e 36 38 6b | 20 63 6f 6d 70 69 6c 65 |s syn68k| compile|
|00002f50| 20 74 68 65 20 74 61 72 | 67 65 74 0d 0a 72 6f 75 | the tar|get..rou|
|00002f60| 74 69 6e 65 2e 20 20 4f | 6e 63 65 20 74 68 61 74 |tine. O|nce that|
|00002f70| 20 74 61 72 67 65 74 20 | 72 6f 75 74 69 6e 65 20 | target |routine |
|00002f80| 69 73 20 63 6f 6d 70 69 | 6c 65 64 2c 20 73 79 6e |is compi|led, syn|
|00002f90| 36 38 6b 20 6d 6f 64 69 | 66 69 65 73 0d 0a 74 68 |68k modi|fies..th|
|00002fa0| 65 20 6a 73 72 20 68 61 | 6e 64 6c 65 72 20 74 6f |e jsr ha|ndler to|
|00002fb0| 20 70 6f 69 6e 74 20 64 | 69 72 65 63 74 6c 79 20 | point d|irectly |
|00002fc0| 74 6f 20 74 68 65 20 74 | 61 72 67 65 74 20 72 6f |to the t|arget ro|
|00002fd0| 75 74 69 6e 65 20 73 6f | 20 74 68 61 74 0d 0a 74 |utine so| that..t|
|00002fe0| 68 65 20 6a 73 72 20 77 | 69 6c 6c 20 62 65 20 65 |he jsr w|ill be e|
|00002ff0| 78 74 72 65 6d 65 6c 79 | 20 66 61 73 74 20 74 68 |xtremely| fast th|
|00003000| 65 20 73 65 63 6f 6e 64 | 20 74 69 6d 65 20 69 74 |e second| time it|
|00003010| 20 69 73 20 65 78 65 63 | 75 74 65 64 2e 0d 0a 57 | is exec|uted...W|
|00003020| 65 27 76 65 20 66 6f 75 | 6e 64 20 74 68 61 74 20 |e've fou|nd that |
|00003030| 6c 61 7a 69 6c 79 20 63 | 6f 6d 70 69 6c 69 6e 67 |lazily c|ompiling|
|00003040| 20 74 68 72 6f 75 67 68 | 20 6a 73 72 27 73 20 64 | through| jsr's d|
|00003050| 6f 65 73 20 61 20 67 6f | 6f 64 20 6a 6f 62 20 6f |oes a go|od job o|
|00003060| 66 0d 0a 61 76 6f 69 64 | 69 6e 67 20 63 6f 6d 70 |f..avoid|ing comp|
|00003070| 69 6c 61 74 69 6f 6e 20 | 6c 61 67 20 74 68 61 74 |ilation |lag that|
|00003080| 20 6d 69 67 68 74 20 61 | 6e 6e 6f 79 20 74 68 65 | might a|nnoy the|
|00003090| 20 75 73 65 72 2e 0d 0a | 0d 0a 53 79 6e 36 38 6b | user...|..Syn68k|
|000030a0| 20 64 6f 65 73 20 6e 6f | 74 20 61 74 74 65 6d 70 | does no|t attemp|
|000030b0| 74 20 74 6f 20 67 65 6e | 65 72 61 74 65 20 6e 61 |t to gen|erate na|
|000030c0| 74 69 76 65 20 63 6f 64 | 65 20 66 6f 72 20 61 20 |tive cod|e for a |
|000030d0| 62 61 73 69 63 20 62 6c | 6f 63 6b 0d 0a 75 6e 74 |basic bl|ock..unt|
|000030e0| 69 6c 20 74 68 61 74 20 | 62 6c 6f 63 6b 20 28 6f |il that |block (o|
|000030f0| 72 20 61 20 6e 65 61 72 | 62 79 20 6f 6e 65 29 20 |r a near|by one) |
|00003100| 68 61 73 20 62 65 65 6e | 20 65 78 65 63 75 74 65 |has been| execute|
|00003110| 64 20 35 30 20 74 69 6d | 65 73 2e 0d 0a 54 68 69 |d 50 tim|es...Thi|
|00003120| 73 20 73 61 76 65 73 20 | 6d 65 6d 6f 72 79 20 61 |s saves |memory a|
|00003130| 6e 64 20 73 6f 6d 65 20 | 63 6f 6d 70 69 6c 61 74 |nd some |compilat|
|00003140| 69 6f 6e 20 74 69 6d 65 | 2c 20 61 6c 74 68 6f 75 |ion time|, althou|
|00003150| 67 68 20 77 65 20 68 61 | 76 65 6e 27 74 0d 0a 6e |gh we ha|ven't..n|
|00003160| 6f 74 69 63 65 64 20 61 | 6e 79 20 70 61 72 74 69 |oticed a|ny parti|
|00003170| 63 75 6c 61 72 20 73 6c | 75 67 67 69 73 68 6e 65 |cular sl|uggishne|
|00003180| 73 73 20 77 68 65 6e 20 | 63 6f 6d 70 69 6c 69 6e |ss when |compilin|
|00003190| 67 20 74 6f 20 6e 61 74 | 69 76 65 20 63 6f 64 65 |g to nat|ive code|
|000031a0| 2e 0d 0a 0d 0a 5c 73 65 | 63 74 69 6f 6e 7b 4f 74 |.....\se|ction{Ot|
|000031b0| 68 65 72 20 6f 70 74 69 | 6d 69 7a 61 74 69 6f 6e |her opti|mization|
|000031c0| 73 7d 0d 0a 0d 0a 53 79 | 6e 36 38 6b 20 6d 61 69 |s}....Sy|n68k mai|
|000031d0| 6e 74 61 69 6e 73 20 61 | 6e 20 69 6e 74 65 72 6e |ntains a|n intern|
|000031e0| 61 6c 20 60 60 6a 73 72 | 20 73 74 61 63 6b 27 27 |al ``jsr| stack''|
|000031f0| 20 74 6f 20 73 70 65 65 | 64 20 75 70 20 74 68 65 | to spee|d up the|
|00003200| 20 63 6f 6d 6d 6f 6e 0d | 0a 63 61 73 65 20 6f 66 | common.|.case of|
|00003210| 20 6a 73 72 2f 72 74 73 | 2e 20 20 57 65 20 72 65 | jsr/rts|. We re|
|00003220| 61 6c 69 7a 65 20 74 68 | 61 74 20 74 68 65 20 72 |alize th|at the r|
|00003230| 74 73 20 61 64 64 72 65 | 73 73 20 6d 69 67 68 74 |ts addre|ss might|
|00003240| 20 68 61 76 65 20 62 65 | 65 6e 0d 0a 66 69 64 64 | have be|en..fidd|
|00003250| 6c 65 64 20 77 69 74 68 | 2c 20 73 6f 20 74 68 65 |led with|, so the|
|00003260| 20 72 74 73 20 68 61 6e | 64 6c 65 72 20 76 65 72 | rts han|dler ver|
|00003270| 69 66 69 65 73 20 61 74 | 20 72 75 6e 74 69 6d 65 |ifies at| runtime|
|00003280| 20 74 68 61 74 20 74 68 | 65 20 72 74 73 0d 0a 61 | that th|e rts..a|
|00003290| 64 64 72 65 73 73 20 6d | 61 74 63 68 65 73 20 74 |ddress m|atches t|
|000032a0| 68 65 20 74 61 67 20 6f | 6e 20 74 6f 70 20 6f 66 |he tag o|n top of|
|000032b0| 20 74 68 65 20 6a 73 72 | 20 73 74 61 63 6b 2e 20 | the jsr| stack. |
|000032c0| 20 49 66 20 69 74 20 6d | 61 74 63 68 65 73 2c 0d | If it m|atches,.|
|000032d0| 0a 73 79 6e 36 38 6b 20 | 64 6f 65 73 20 61 20 66 |.syn68k |does a f|
|000032e0| 61 73 74 20 6a 75 6d 70 | 2e 20 20 49 66 20 69 74 |ast jump|. If it|
|000032f0| 20 64 6f 65 73 6e 27 74 | 2c 20 73 79 6e 36 38 6b | doesn't|, syn68k|
|00003300| 20 6c 6f 6f 6b 73 20 75 | 70 20 74 68 65 20 63 6f | looks u|p the co|
|00003310| 64 65 0d 0a 63 6f 72 72 | 65 73 70 6f 6e 64 69 6e |de..corr|espondin|
|00003320| 67 20 74 6f 20 74 68 65 | 20 72 74 73 20 61 64 64 |g to the| rts add|
|00003330| 72 65 73 73 20 69 6e 20 | 61 20 68 61 73 68 20 74 |ress in |a hash t|
|00003340| 61 62 6c 65 2e 0d 0a 0d | 0a 5c 73 65 63 74 69 6f |able....|.\sectio|
|00003350| 6e 7b 4e 65 61 74 20 68 | 61 63 6b 73 7d 0d 0a 0d |n{Neat h|acks}...|
|00003360| 0a 54 68 65 20 6c 6f 77 | 2d 6c 65 76 65 6c 20 63 |.The low|-level c|
|00003370| 6f 64 65 20 67 65 6e 65 | 72 61 74 69 6f 6e 20 72 |ode gene|ration r|
|00003380| 6f 75 74 69 6e 65 73 20 | 66 6f 72 20 74 68 65 20 |outines |for the |
|00003390| 38 30 78 38 36 20 62 61 | 63 6b 20 65 6e 64 20 61 |80x86 ba|ck end a|
|000033a0| 72 65 0d 0a 6d 61 63 68 | 69 6e 65 20 67 65 6e 65 |re..mach|ine gene|
|000033b0| 72 61 74 65 64 20 66 72 | 6f 6d 20 61 73 73 65 6d |rated fr|om assem|
|000033c0| 62 6c 79 20 6c 61 6e 67 | 75 61 67 65 20 74 65 6d |bly lang|uage tem|
|000033d0| 70 6c 61 74 65 73 2e 20 | 20 54 68 6f 75 73 61 6e |plates. | Thousan|
|000033e0| 64 73 20 6f 66 0d 0a 6f | 70 65 72 61 6e 64 20 70 |ds of..o|perand p|
|000033f0| 65 72 6d 75 74 61 74 69 | 6f 6e 73 20 66 6f 72 20 |ermutati|ons for |
|00003400| 38 30 78 38 36 20 69 6e | 73 74 72 75 63 74 69 6f |80x86 in|structio|
|00003410| 6e 73 20 6f 66 20 69 6e | 74 65 72 65 73 74 20 61 |ns of in|terest a|
|00003420| 72 65 20 72 75 6e 0d 0a | 74 68 72 6f 75 67 68 20 |re run..|through |
|00003430| 74 68 65 20 73 79 73 74 | 65 6d 27 73 20 61 73 73 |the syst|em's ass|
|00003440| 65 6d 62 6c 65 72 20 61 | 6e 64 20 61 6e 61 6c 79 |embler a|nd analy|
|00003450| 7a 65 64 20 74 6f 20 64 | 65 72 69 76 65 20 74 68 |zed to d|erive th|
|00003460| 65 20 72 75 6c 65 73 0d | 0a 74 68 65 20 61 73 73 |e rules.|.the ass|
|00003470| 65 6d 62 6c 65 72 20 75 | 73 65 73 20 74 6f 20 63 |embler u|ses to c|
|00003480| 72 65 61 74 65 20 62 69 | 6e 61 72 69 65 73 2e 20 |reate bi|naries. |
|00003490| 20 54 68 6f 73 65 20 72 | 75 6c 65 73 20 61 72 65 | Those r|ules are|
|000034a0| 20 65 6e 63 61 70 73 75 | 6c 61 74 65 64 0d 0a 69 | encapsu|lated..i|
|000034b0| 6e 74 6f 20 43 20 63 6f | 64 65 20 61 6e 64 20 63 |nto C co|de and c|
|000034c0| 6f 6d 70 69 6c 65 64 20 | 69 6e 74 6f 20 73 79 6e |ompiled |into syn|
|000034d0| 36 38 6b 20 73 6f 20 77 | 65 20 63 61 6e 20 67 65 |68k so w|e can ge|
|000034e0| 6e 65 72 61 74 65 20 62 | 69 6e 61 72 69 65 73 0d |nerate b|inaries.|
|000034f0| 0a 6f 6e 20 74 68 65 20 | 66 6c 79 2e 20 20 48 65 |.on the |fly. He|
|00003500| 72 65 20 69 73 20 61 20 | 73 61 6d 70 6c 65 20 74 |re is a |sample t|
|00003510| 65 6d 70 6c 61 74 65 3a | 0d 0a 0d 0a 5c 62 65 67 |emplate:|....\beg|
|00003520| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0d 0a 20 20 |in{verba|tim}.. |
|00003530| 7b 20 22 69 33 38 36 5f | 6c 65 61 6c 5f 69 6e 64 |{ "i386_|leal_ind|
|00003540| 6f 66 66 22 2c 20 22 22 | 2c 20 22 22 2c 20 22 22 |off", ""|, "", ""|
|00003550| 2c 20 22 22 2c 20 22 2d | 22 2c 0d 0a 20 20 20 20 |, "", "-|",.. |
|00003560| 20 20 22 6c 65 61 6c 20 | 25 30 28 25 31 29 2c 25 | "leal |%0(%1),%|
|00003570| 32 22 2c 0d 0a 20 20 20 | 20 20 20 7b 20 22 6f 66 |2",.. | { "of|
|00003580| 66 73 65 74 22 2c 20 22 | 62 61 73 65 22 2c 20 22 |fset", "|base", "|
|00003590| 64 73 74 22 20 7d 2c 0d | 0a 20 20 20 20 20 20 7b |dst" },.|. {|
|000035a0| 20 7b 20 53 49 5a 45 5f | 33 32 2c 20 43 4f 4e 53 | { SIZE_|32, CONS|
|000035b0| 54 41 4e 54 2c 20 49 4e | 20 7d 2c 20 7b 20 53 49 |TANT, IN| }, { SI|
|000035c0| 5a 45 5f 33 32 2c 20 52 | 45 47 49 53 54 45 52 2c |ZE_32, R|EGISTER,|
|000035d0| 20 49 4e 20 7d 2c 0d 0a | 09 20 20 20 20 7b 20 53 | IN },..|. { S|
|000035e0| 49 5a 45 5f 33 32 2c 20 | 52 45 47 49 53 54 45 52 |IZE_32, |REGISTER|
|000035f0| 2c 20 4f 55 54 20 7d 20 | 7d 20 7d 2c 0d 0a 5c 65 |, OUT } |} },..\e|
|00003600| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 0d 0a 0d 0a |nd{verba|tim}....|
|00003610| 54 68 69 73 20 61 70 70 | 72 6f 61 63 68 20 68 61 |This app|roach ha|
|00003620| 73 20 73 61 76 65 64 20 | 75 73 20 63 6f 75 6e 74 |s saved |us count|
|00003630| 6c 65 73 73 20 68 6f 75 | 72 73 20 6f 66 20 64 65 |less hou|rs of de|
|00003640| 62 75 67 67 69 6e 67 20 | 61 6e 64 20 61 6c 6c 6f |bugging |and allo|
|00003650| 77 73 0d 0a 6f 75 72 20 | 73 79 73 74 65 6d 20 74 |ws..our |system t|
|00003660| 6f 20 61 75 74 6f 6d 61 | 74 69 63 61 6c 6c 79 20 |o automa|tically |
|00003670| 70 65 72 66 6f 72 6d 20 | 74 68 65 20 73 61 6d 65 |perform |the same|
|00003680| 20 6f 70 74 69 6d 69 7a | 61 74 69 6f 6e 73 20 61 | optimiz|ations a|
|00003690| 73 20 74 68 65 0d 0a 68 | 6f 73 74 20 73 79 73 74 |s the..h|ost syst|
|000036a0| 65 6d 27 73 20 61 73 73 | 65 6d 62 6c 65 72 2e 0d |em's ass|embler..|
|000036b0| 0a 0d 0a 57 65 27 76 65 | 20 61 6e 6e 6f 74 61 74 |...We've| annotat|
|000036c0| 65 64 20 6f 75 72 20 38 | 30 78 38 36 20 64 65 73 |ed our 8|0x86 des|
|000036d0| 63 72 69 70 74 69 6f 6e | 73 20 77 69 74 68 20 69 |cription|s with i|
|000036e0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 61 62 6f 75 74 |nformati|on about|
|000036f0| 0d 0a 50 65 6e 74 69 75 | 6d 20 70 61 69 72 61 62 |..Pentiu|m pairab|
|00003700| 69 6c 69 74 79 20 73 6f | 20 74 68 61 74 20 66 75 |ility so| that fu|
|00003710| 74 75 72 65 20 76 65 72 | 73 69 6f 6e 73 20 6f 66 |ture ver|sions of|
|00003720| 20 73 79 6e 36 38 6b 20 | 63 61 6e 20 73 63 68 65 | syn68k |can sche|
|00003730| 64 75 6c 65 0d 0a 74 68 | 65 20 6e 61 74 69 76 65 |dule..th|e native|
|00003740| 20 63 6f 64 65 20 77 65 | 20 67 65 6e 65 72 61 74 | code we| generat|
|00003750| 65 20 28 77 65 20 61 6c | 72 65 61 64 79 20 73 63 |e (we al|ready sc|
|00003760| 68 65 64 75 6c 65 20 6f | 75 72 20 6d 61 69 6e 20 |hedule o|ur main |
|00003770| 69 6e 74 65 72 70 72 65 | 74 65 72 0d 0a 77 68 65 |interpre|ter..whe|
|00003780| 6e 20 77 65 20 62 75 69 | 6c 64 20 73 79 6e 36 38 |n we bui|ld syn68|
|00003790| 6b 29 2e 0d 0a 0d 0a 5c | 73 65 63 74 69 6f 6e 7b |k).....\|section{|
|000037a0| 46 75 74 75 72 65 20 6f | 70 74 69 6d 69 7a 61 74 |Future o|ptimizat|
|000037b0| 69 6f 6e 73 7d 0d 0a 0d | 0a 57 65 20 61 72 65 20 |ions}...|.We are |
|000037c0| 77 6f 72 6b 69 6e 67 20 | 6f 6e 20 61 20 73 69 6d |working |on a sim|
|000037d0| 70 6c 65 20 69 6e 74 65 | 72 2d 62 6c 6f 63 6b 20 |ple inte|r-block |
|000037e0| 72 65 67 69 73 74 65 72 | 20 61 6c 6c 6f 63 61 74 |register| allocat|
|000037f0| 69 6f 6e 20 61 6c 67 6f | 72 69 74 68 6d 2e 0d 0a |ion algo|rithm...|
|00003800| 0d 0a 42 79 20 72 65 6c | 6f 63 61 74 69 6e 67 20 |..By rel|ocating |
|00003810| 6d 6f 73 74 20 36 38 30 | 78 30 20 72 65 67 69 73 |most 680|x0 regis|
|00003820| 74 65 72 20 74 6f 20 38 | 30 78 38 36 20 72 65 67 |ter to 8|0x86 reg|
|00003830| 69 73 74 65 72 20 6d 6f | 76 65 73 20 74 6f 20 74 |ister mo|ves to t|
|00003840| 68 65 0d 0a 62 65 67 69 | 6e 6e 69 6e 67 20 6f 66 |he..begi|nning of|
|00003850| 20 65 61 63 68 20 62 6c | 6f 63 6b 2c 20 77 65 20 | each bl|ock, we |
|00003860| 63 61 6e 20 69 6d 70 72 | 6f 76 65 20 50 65 6e 74 |can impr|ove Pent|
|00003870| 69 75 6d 20 70 61 69 72 | 61 62 69 6c 69 74 79 20 |ium pair|ability |
|00003880| 61 6e 64 0d 0a 72 65 64 | 75 63 65 20 38 30 34 38 |and..red|uce 8048|
|00003890| 36 20 61 6e 64 20 50 65 | 6e 74 69 75 6d 20 61 64 |6 and Pe|ntium ad|
|000038a0| 64 72 65 73 73 20 67 65 | 6e 65 72 61 74 69 6f 6e |dress ge|neration|
|000038b0| 20 70 69 70 65 6c 69 6e | 65 20 73 74 61 6c 6c 73 | pipelin|e stalls|
|000038c0| 2e 0d 0a 0d 0a 4e 6f 77 | 20 74 68 61 74 20 77 65 |.....Now| that we|
|000038d0| 20 63 6f 6d 70 69 6c 65 | 20 74 6f 20 6e 61 74 69 | compile| to nati|
|000038e0| 76 65 20 63 6f 64 65 2c | 20 41 2d 6c 69 6e 65 20 |ve code,| A-line |
|000038f0| 74 72 61 70 20 6f 76 65 | 72 68 65 61 64 20 69 73 |trap ove|rhead is|
|00003900| 20 62 65 63 6f 6d 69 6e | 67 0d 0a 73 69 67 6e 69 | becomin|g..signi|
|00003910| 66 69 63 61 6e 74 2e 20 | 20 57 65 20 6d 61 79 20 |ficant. | We may |
|00003920| 73 6f 6f 6e 20 63 6f 6d | 70 69 6c 65 20 41 2d 6c |soon com|pile A-l|
|00003930| 69 6e 65 20 74 72 61 70 | 73 20 74 6f 20 6e 61 74 |ine trap|s to nat|
|00003940| 69 76 65 20 63 6f 64 65 | 20 74 68 61 74 0d 0a 64 |ive code| that..d|
|00003950| 69 72 65 63 74 6c 79 20 | 63 61 6c 6c 73 20 74 68 |irectly |calls th|
|00003960| 65 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 52 4f |e approp|riate RO|
|00003970| 4d 6c 69 62 20 72 6f 75 | 74 69 6e 65 20 77 69 74 |Mlib rou|tine wit|
|00003980| 68 20 74 68 65 20 61 70 | 70 72 6f 70 72 69 61 74 |h the ap|propriat|
|00003990| 65 0d 0a 61 72 67 75 6d | 65 6e 74 73 20 28 63 68 |e..argum|ents (ch|
|000039a0| 65 63 6b 69 6e 67 20 61 | 74 20 72 75 6e 74 69 6d |ecking a|t runtim|
|000039b0| 65 20 74 6f 20 6d 61 6b | 65 20 73 75 72 65 20 74 |e to mak|e sure t|
|000039c0| 68 61 74 20 6e 65 69 74 | 68 65 72 20 74 68 65 20 |hat neit|her the |
|000039d0| 74 72 61 70 0d 0a 6e 6f | 72 20 74 68 65 20 41 2d |trap..no|r the A-|
|000039e0| 6c 69 6e 65 20 76 65 63 | 74 6f 72 20 68 61 73 20 |line vec|tor has |
|000039f0| 62 65 65 6e 20 70 61 74 | 63 68 65 64 20 6f 75 74 |been pat|ched out|
|00003a00| 2c 20 6f 66 20 63 6f 75 | 72 73 65 29 2e 0d 0a 0d |, of cou|rse)....|
|00003a10| 0a 5c 73 65 63 74 69 6f | 6e 7b 43 6f 64 65 20 65 |.\sectio|n{Code e|
|00003a20| 78 61 6d 70 6c 65 73 7d | 0d 0a 0d 0a 48 65 72 65 |xamples}|....Here|
|00003a30| 20 61 72 65 20 74 77 6f | 20 73 61 6d 70 6c 65 20 | are two| sample |
|00003a40| 36 38 30 78 30 20 63 6f | 64 65 20 73 65 71 75 65 |680x0 co|de seque|
|00003a50| 6e 63 65 73 20 66 72 6f | 6d 20 72 65 61 6c 20 61 |nces fro|m real a|
|00003a60| 70 70 6c 69 63 61 74 69 | 6f 6e 73 2c 0d 0a 61 6e |pplicati|ons,..an|
|00003a70| 64 20 74 68 65 20 38 30 | 78 38 36 20 63 6f 64 65 |d the 80|x86 code|
|00003a80| 20 74 68 61 74 20 73 79 | 6e 36 38 6b 20 67 65 6e | that sy|n68k gen|
|00003a90| 65 72 61 74 65 73 20 66 | 6f 72 20 74 68 65 6d 2e |erates f|or them.|
|00003aa0| 20 20 57 65 20 63 68 6f | 73 65 20 74 68 65 73 65 | We cho|se these|
|00003ab0| 0d 0a 63 6f 64 65 20 73 | 65 71 75 65 6e 63 65 73 |..code s|equences|
|00003ac0| 20 73 70 65 63 69 66 69 | 63 61 6c 6c 79 20 74 6f | specifi|cally to|
|00003ad0| 20 73 68 6f 77 63 61 73 | 65 20 73 65 76 65 72 61 | showcas|e severa|
|00003ae0| 6c 20 6f 66 20 74 68 65 | 20 74 65 63 68 6e 69 71 |l of the| techniq|
|00003af0| 75 65 73 0d 0a 77 65 20 | 75 73 65 2c 20 73 6f 20 |ues..we |use, so |
|00003b00| 79 6f 75 20 73 68 6f 75 | 6c 64 6e 27 74 20 75 73 |you shou|ldn't us|
|00003b10| 65 20 74 68 65 6d 20 61 | 73 20 61 20 73 75 62 73 |e them a|s a subs|
|00003b20| 74 69 74 75 74 65 20 66 | 6f 72 20 62 65 6e 63 68 |titute f|or bench|
|00003b30| 6d 61 72 6b 73 2e 0d 0a | 4e 6f 74 20 61 6c 6c 20 |marks...|Not all |
|00003b40| 36 38 30 78 30 20 63 6f | 64 65 20 74 72 61 6e 73 |680x0 co|de trans|
|00003b50| 6c 61 74 65 73 20 61 73 | 20 77 65 6c 6c 20 61 73 |lates as| well as|
|00003b60| 20 74 68 65 73 65 20 65 | 78 61 6d 70 6c 65 73 20 | these e|xamples |
|00003b70| 64 6f 2c 20 62 75 74 0d | 0a 74 68 65 73 65 20 65 |do, but.|.these e|
|00003b80| 78 61 6d 70 6c 65 73 20 | 61 72 65 20 66 61 72 20 |xamples |are far |
|00003b90| 66 72 6f 6d 20 65 78 6f | 74 69 63 2e 0d 0a 0d 0a |from exo|tic.....|
|00003ba0| 5c 62 65 67 69 6e 7b 69 | 74 65 6d 69 7a 65 7d 0d |\begin{i|temize}.|
|00003bb0| 0a 5c 69 74 65 6d 20 45 | 78 61 6d 70 6c 65 20 31 |.\item E|xample 1|
|00003bc0| 20 28 53 6f 6c 61 72 69 | 61 6e 29 3a 0d 0a 0d 0a | (Solari|an):....|
|00003bd0| 5c 62 65 67 69 6e 7b 76 | 65 72 62 61 74 69 6d 7d |\begin{v|erbatim}|
|00003be0| 0d 0a 36 38 30 78 30 20 | 63 6f 64 65 3a 0d 0a 0d |..680x0 |code:...|
|00003bf0| 0a 09 61 64 64 71 62 09 | 23 31 2c 61 34 40 28 31 |..addqb.|#1,a4@(1|
|00003c00| 29 0d 0a 09 6d 6f 76 65 | 6c 09 23 30 2c 64 30 0d |)...move|l.#0,d0.|
|00003c10| 0a 09 6d 6f 76 65 62 09 | 61 34 40 2c 64 30 0d 0a |..moveb.|a4@,d0..|
|00003c20| 09 73 77 61 70 09 64 30 | 0d 0a 09 63 6c 72 77 09 |.swap.d0|...clrw.|
|00003c30| 64 30 0d 0a 09 73 77 61 | 70 09 64 30 0d 0a 09 61 |d0...swa|p.d0...a|
|00003c40| 73 6c 6c 09 23 32 2c 64 | 30 0d 0a 09 6c 65 61 09 |sll.#2,d|0...lea.|
|00003c50| 61 35 40 28 2d 31 33 34 | 36 32 29 2c 61 30 0d 0a |a5@(-134|62),a0..|
|00003c60| 09 61 64 64 61 6c 09 64 | 30 2c 61 30 0d 0a 09 6d |.addal.d|0,a0...m|
|00003c70| 6f 76 65 61 6c 09 61 30 | 40 2c 61 30 0d 0a 09 6d |oveal.a0|@,a0...m|
|00003c80| 6f 76 65 6c 09 23 30 2c | 64 30 0d 0a 09 6d 6f 76 |ovel.#0,|d0...mov|
|00003c90| 65 62 09 61 34 40 28 31 | 29 2c 64 30 0d 0a 09 63 |eb.a4@(1|),d0...c|
|00003ca0| 6d 70 77 09 61 30 40 2c | 64 30 0d 0a 09 62 63 73 |mpw.a0@,|d0...bcs|
|00003cb0| 09 30 78 33 66 66 66 65 | 65 32 0d 0a 0d 0a 38 30 |.0x3fffe|e2....80|
|00003cc0| 78 38 36 20 63 6f 64 65 | 3a 0d 0a 0d 0a 09 6d 6f |x86 code|:.....mo|
|00003cd0| 76 6c 09 5f 61 34 2c 25 | 65 64 69 09 09 3b 20 61 |vl._a4,%|edi..; a|
|00003ce0| 64 64 71 62 20 23 31 2c | 61 34 40 28 31 29 0d 0a |ddqb #1,|a4@(1)..|
|00003cf0| 09 61 64 64 62 09 24 30 | 78 31 2c 30 78 31 28 25 |.addb.$0|x1,0x1(%|
|00003d00| 65 64 69 29 0d 0a 09 78 | 6f 72 6c 09 25 65 62 78 |edi)...x|orl.%ebx|
|00003d10| 2c 25 65 62 78 09 09 3b | 20 6d 6f 76 65 6c 20 23 |,%ebx..;| movel #|
|00003d20| 30 2c 64 30 0d 0a 09 6d | 6f 76 62 09 28 25 65 64 |0,d0...m|ovb.(%ed|
|00003d30| 69 29 2c 25 62 6c 09 09 | 3b 20 6d 6f 76 65 62 20 |i),%bl..|; moveb |
|00003d40| 61 34 40 2c 64 30 0d 0a | 09 72 6f 72 6c 09 24 30 |a4@,d0..|.rorl.$0|
|00003d50| 78 31 30 2c 25 65 62 78 | 09 09 3b 20 73 77 61 70 |x10,%ebx|..; swap|
|00003d60| 20 64 30 0d 0a 09 78 6f | 72 77 09 25 62 78 2c 25 | d0...xo|rw.%bx,%|
|00003d70| 62 78 09 09 09 3b 20 63 | 6c 72 77 20 64 30 0d 0a |bx...; c|lrw d0..|
|00003d80| 09 72 6f 72 6c 09 24 30 | 78 31 30 2c 25 65 62 78 |.rorl.$0|x10,%ebx|
|00003d90| 09 09 3b 20 73 77 61 70 | 20 64 30 0d 0a 09 73 68 |..; swap| d0...sh|
|00003da0| 6c 6c 09 24 30 78 32 2c | 25 65 62 78 09 09 3b 20 |ll.$0x2,|%ebx..; |
|00003db0| 61 73 6c 6c 20 23 32 2c | 64 30 0d 0a 09 6d 6f 76 |asll #2,|d0...mov|
|00003dc0| 6c 09 5f 61 35 2c 25 65 | 73 69 09 09 3b 20 6c 65 |l._a5,%e|si..; le|
|00003dd0| 61 20 61 35 40 28 2d 31 | 33 34 36 32 29 2c 61 30 |a a5@(-1|3462),a0|
|00003de0| 0d 0a 09 6c 65 61 6c 09 | 30 78 66 66 66 66 63 62 |...leal.|0xffffcb|
|00003df0| 36 61 28 25 65 73 69 29 | 2c 25 65 64 78 0d 0a 09 |6a(%esi)|,%edx...|
|00003e00| 61 64 64 6c 09 25 65 62 | 78 2c 25 65 64 78 09 09 |addl.%eb|x,%edx..|
|00003e10| 3b 20 61 64 64 61 6c 20 | 64 30 2c 61 30 0d 0a 09 |; addal |d0,a0...|
|00003e20| 6d 6f 76 6c 09 28 25 65 | 64 78 29 2c 25 65 64 78 |movl.(%e|dx),%edx|
|00003e30| 09 09 3b 20 6d 6f 76 65 | 61 6c 20 61 30 40 2c 61 |..; move|al a0@,a|
|00003e40| 30 0d 0a 09 78 6f 72 6c | 09 25 65 62 78 2c 25 65 |0...xorl|.%ebx,%e|
|00003e50| 62 78 09 09 3b 20 6d 6f | 76 65 6c 20 23 30 2c 64 |bx..; mo|vel #0,d|
|00003e60| 30 0d 0a 09 6d 6f 76 62 | 09 30 78 31 28 25 65 64 |0...movb|.0x1(%ed|
|00003e70| 69 29 2c 25 62 6c 09 09 | 3b 20 6d 6f 76 65 62 20 |i),%bl..|; moveb |
|00003e80| 61 34 40 28 31 29 2c 64 | 30 0d 0a 09 62 73 77 61 |a4@(1),d|0...bswa|
|00003e90| 70 09 25 65 64 78 09 09 | 09 3b 20 63 6d 70 77 20 |p.%edx..|.; cmpw |
|00003ea0| 61 30 40 2c 64 30 0d 0a | 09 6d 6f 76 77 09 28 25 |a0@,d0..|.movw.(%|
|00003eb0| 65 64 78 29 2c 25 63 78 | 0d 0a 09 72 6f 72 77 09 |edx),%cx|...rorw.|
|00003ec0| 24 30 78 38 2c 25 63 78 | 0d 0a 09 63 6d 70 77 09 |$0x8,%cx|...cmpw.|
|00003ed0| 25 63 78 2c 25 62 78 0d | 0a 09 6d 6f 76 6c 09 25 |%cx,%bx.|..movl.%|
|00003ee0| 65 64 78 2c 5f 61 30 09 | 09 3b 20 3c 73 70 69 6c |edx,_a0.|.; <spil|
|00003ef0| 6c 20 64 69 72 74 79 20 | 36 38 6b 0d 0a 09 6d 6f |l dirty |68k...mo|
|00003f00| 76 6c 09 25 65 62 78 2c | 5f 64 30 09 09 3b 20 20 |vl.%ebx,|_d0..; |
|00003f10| 72 65 67 69 73 74 65 72 | 73 20 62 61 63 6b 20 74 |register|s back t|
|00003f20| 6f 20 6d 65 6d 6f 72 79 | 3e 0d 0a 09 6a 62 09 30 |o memory|>...jb.0|
|00003f30| 78 36 66 61 65 30 63 09 | 09 3b 20 62 63 73 20 30 |x6fae0c.|.; bcs 0|
|00003f40| 78 33 66 66 66 65 65 32 | 0d 0a 09 6a 6d 70 09 30 |x3fffee2|...jmp.0|
|00003f50| 78 36 66 61 66 30 63 09 | 09 3b 20 3c 67 6f 20 74 |x6faf0c.|.; <go t|
|00003f60| 6f 20 22 66 61 6c 6c 20 | 74 68 72 6f 75 67 68 22 |o "fall |through"|
|00003f70| 20 63 6f 64 65 3e 0d 0a | 5c 65 6e 64 7b 76 65 72 | code>..|\end{ver|
|00003f80| 62 61 74 69 6d 7d 0d 0a | 5c 69 74 65 6d 20 45 78 |batim}..|\item Ex|
|00003f90| 61 6d 70 6c 65 20 32 20 | 28 50 61 67 65 4d 61 6b |ample 2 |(PageMak|
|00003fa0| 65 72 29 3a 0d 0a 0d 0a | 5c 62 65 67 69 6e 7b 76 |er):....|\begin{v|
|00003fb0| 65 72 62 61 74 69 6d 7d | 0d 0a 36 38 30 78 30 20 |erbatim}|..680x0 |
|00003fc0| 63 6f 64 65 3a 0d 0a 0d | 0a 09 6d 6f 76 65 6c 09 |code:...|..movel.|
|00003fd0| 23 30 2c 64 32 0d 0a 09 | 6d 6f 76 65 62 09 64 30 |#0,d2...|moveb.d0|
|00003fe0| 2c 64 32 0d 0a 09 6c 73 | 6c 77 09 23 38 2c 64 30 |,d2...ls|lw.#8,d0|
|00003ff0| 0d 0a 09 6f 72 77 09 64 | 30 2c 64 32 0d 0a 09 6d |...orw.d|0,d2...m|
|00004000| 6f 76 65 6c 09 64 32 2c | 64 30 0d 0a 09 73 77 61 |ovel.d2,|d0...swa|
|00004010| 70 09 64 32 0d 0a 09 6f | 72 6c 09 64 32 2c 64 30 |p.d2...o|rl.d2,d0|
|00004020| 0d 0a 09 6d 6f 76 65 6c | 09 61 30 2c 64 32 0d 0a |...movel|.a0,d2..|
|00004030| 09 6c 73 72 62 09 23 31 | 2c 64 32 0d 0a 09 62 63 |.lsrb.#1|,d2...bc|
|00004040| 63 09 30 78 33 66 66 66 | 65 64 34 0d 0a 0d 0a 38 |c.0x3fff|ed4....8|
|00004050| 30 78 38 36 20 63 6f 64 | 65 3a 0d 0a 0d 0a 09 78 |0x86 cod|e:.....x|
|00004060| 6f 72 6c 09 25 65 62 78 | 2c 25 65 62 78 09 09 3b |orl.%ebx|,%ebx..;|
|00004070| 20 6d 6f 76 65 6c 20 23 | 30 2c 64 32 0d 0a 09 6d | movel #|0,d2...m|
|00004080| 6f 76 6c 09 5f 64 30 2c | 25 65 64 78 09 09 3b 20 |ovl._d0,|%edx..; |
|00004090| 6d 6f 76 65 62 20 64 30 | 2c 64 32 0d 0a 09 6d 6f |moveb d0|,d2...mo|
|000040a0| 76 62 09 25 64 6c 2c 25 | 62 6c 0d 0a 09 73 68 6c |vb.%dl,%|bl...shl|
|000040b0| 77 09 24 30 78 38 2c 25 | 64 78 09 09 3b 20 6c 73 |w.$0x8,%|dx..; ls|
|000040c0| 6c 77 20 23 38 2c 64 30 | 0d 0a 09 6f 72 77 09 25 |lw #8,d0|...orw.%|
|000040d0| 64 78 2c 25 62 78 09 09 | 09 3b 20 6f 72 77 20 64 |dx,%bx..|.; orw d|
|000040e0| 30 2c 64 32 0d 0a 09 6d | 6f 76 6c 09 25 65 62 78 |0,d2...m|ovl.%ebx|
|000040f0| 2c 25 65 64 78 09 09 3b | 20 6d 6f 76 65 6c 20 64 |,%edx..;| movel d|
|00004100| 32 2c 64 30 0d 0a 09 72 | 6f 72 6c 09 24 30 78 31 |2,d0...r|orl.$0x1|
|00004110| 30 2c 25 65 62 78 09 09 | 3b 20 73 77 61 70 20 64 |0,%ebx..|; swap d|
|00004120| 32 0d 0a 09 6f 72 6c 09 | 25 65 62 78 2c 25 65 64 |2...orl.|%ebx,%ed|
|00004130| 78 09 09 3b 20 6f 72 6c | 20 64 32 2c 64 30 0d 0a |x..; orl| d2,d0..|
|00004140| 09 6d 6f 76 6c 09 5f 61 | 30 2c 25 65 63 78 09 09 |.movl._a|0,%ecx..|
|00004150| 3b 20 6d 6f 76 65 6c 20 | 61 30 2c 64 32 0d 0a 09 |; movel |a0,d2...|
|00004160| 6d 6f 76 6c 09 25 65 63 | 78 2c 25 65 62 78 0d 0a |movl.%ec|x,%ebx..|
|00004170| 09 73 68 72 62 09 25 62 | 6c 09 09 09 3b 20 6c 73 |.shrb.%b|l...; ls|
|00004180| 72 62 20 23 31 2c 64 32 | 0d 0a 09 6d 6f 76 6c 09 |rb #1,d2|...movl.|
|00004190| 25 65 62 78 2c 5f 64 32 | 09 09 3b 20 3c 73 70 69 |%ebx,_d2|..; <spi|
|000041a0| 6c 6c 20 64 69 72 74 79 | 20 36 38 6b 0d 0a 09 6d |ll dirty| 68k...m|
|000041b0| 6f 76 6c 09 25 65 64 78 | 2c 5f 64 30 09 09 3b 20 |ovl.%edx|,_d0..; |
|000041c0| 20 72 65 67 69 73 74 65 | 72 73 20 62 61 63 6b 20 | registe|rs back |
|000041d0| 74 6f 20 6d 65 6d 6f 72 | 79 3e 0d 0a 09 6a 61 65 |to memor|y>...jae|
|000041e0| 09 30 78 33 62 37 33 34 | 63 09 09 3b 20 62 63 63 |.0x3b734|c..; bcc|
|000041f0| 20 30 78 33 66 66 66 65 | 64 34 0d 0a 09 6a 6d 70 | 0x3fffe|d4...jmp|
|00004200| 09 30 78 34 33 64 34 38 | 63 09 09 3b 20 3c 67 6f |.0x43d48|c..; <go|
|00004210| 20 74 6f 20 22 66 61 6c | 6c 20 74 68 72 6f 75 67 | to "fal|l throug|
|00004220| 68 22 20 36 38 6b 20 63 | 6f 64 65 3e 0d 0a 5c 65 |h" 68k c|ode>..\e|
|00004230| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 0d 0a 5c 65 |nd{verba|tim}..\e|
|00004240| 6e 64 7b 69 74 65 6d 69 | 7a 65 7d 0d 0a 5c 73 65 |nd{itemi|ze}..\se|
|00004250| 63 74 69 6f 6e 7b 42 65 | 6e 63 68 6d 61 72 6b 73 |ction{Be|nchmarks|
|00004260| 7d 0d 0a 0d 0a 54 68 65 | 73 65 20 70 65 72 66 6f |}....The|se perfo|
|00004270| 72 6d 61 6e 63 65 20 6e | 75 6d 62 65 72 73 20 77 |rmance n|umbers w|
|00004280| 65 72 65 20 63 6f 6d 70 | 75 74 65 64 20 77 69 74 |ere comp|uted wit|
|00004290| 68 20 53 70 65 65 64 6f | 6d 65 74 65 72 20 33 2e |h Speedo|meter 3.|
|000042a0| 32 33 2e 0d 0a 57 65 27 | 76 65 20 72 65 6d 6f 76 |23...We'|ve remov|
|000042b0| 65 64 20 74 68 65 20 66 | 6c 6f 61 74 69 6e 67 20 |ed the f|loating |
|000042c0| 70 6f 69 6e 74 20 74 65 | 73 74 73 20 66 72 6f 6d |point te|sts from|
|000042d0| 20 74 68 65 20 6c 69 73 | 74 20 73 69 6e 63 65 20 | the lis|t since |
|000042e0| 74 68 65 79 20 64 6f 0d | 0a 6e 6f 74 20 6d 65 61 |they do.|.not mea|
|000042f0| 73 75 72 65 20 73 79 6e | 36 38 6b 27 73 20 73 70 |sure syn|68k's sp|
|00004300| 65 65 64 2e 20 20 53 79 | 6e 36 38 6b 20 63 6f 6e |eed. Sy|n68k con|
|00004310| 74 61 69 6e 73 20 6e 6f | 20 73 70 65 63 69 61 6c |tains no| special|
|00004320| 20 70 72 6f 76 69 73 69 | 6f 6e 73 0d 0a 66 6f 72 | provisi|ons..for|
|00004330| 20 53 70 65 65 64 6f 6d | 65 74 65 72 27 73 20 62 | Speedom|eter's b|
|00004340| 65 6e 63 68 6d 61 72 6b | 73 20 61 6e 64 20 77 65 |enchmark|s and we|
|00004350| 20 62 65 6c 69 65 76 65 | 20 74 68 61 74 20 74 68 | believe| that th|
|00004360| 65 73 65 20 6e 75 6d 62 | 65 72 73 20 61 72 65 0d |ese numb|ers are.|
|00004370| 0a 69 6e 64 69 63 61 74 | 69 76 65 20 6f 66 20 73 |.indicat|ive of s|
|00004380| 79 6e 36 38 6b 27 73 20 | 70 65 72 66 6f 72 6d 61 |yn68k's |performa|
|00004390| 6e 63 65 20 66 6f 72 20 | 6d 61 6e 79 20 6f 74 68 |nce for |many oth|
|000043a0| 65 72 20 43 50 55 2d 69 | 6e 74 65 6e 73 69 76 65 |er CPU-i|ntensive|
|000043b0| 0d 0a 70 72 6f 67 72 61 | 6d 73 2e 0d 0a 0d 0a 5c |..progra|ms.....\|
|000043c0| 62 65 67 69 6e 7b 63 65 | 6e 74 65 72 7d 0d 0a 5c |begin{ce|nter}..\|
|000043d0| 62 65 67 69 6e 7b 74 61 | 62 75 6c 61 72 7d 7b 7c |begin{ta|bular}{||
|000043e0| 7c 6c 7c 7c 63 7c 63 7c | 63 7c 63 7c 7c 7d 20 5c ||l||c|c||c|c||} \|
|000043f0| 68 6c 69 6e 65 20 5c 68 | 6c 69 6e 65 0d 0a 5c 65 |hline \h|line..\e|
|00004400| 6d 7b 5c 73 6d 61 6c 6c | 7b 54 65 73 74 2f 43 50 |m{\small|{Test/CP|
|00004410| 55 7d 7d 20 26 20 5c 65 | 6d 7b 5c 73 6d 61 6c 6c |U}} & \e|m{\small|
|00004420| 7b 51 75 61 64 72 61 20 | 36 31 30 7d 7d 20 26 20 |{Quadra |610}} & |
|00004430| 5c 65 6d 7b 5c 73 6d 61 | 6c 6c 7b 50 65 6e 74 69 |\em{\sma|ll{Penti|
|00004440| 75 6d 20 39 30 4d 68 7a | 7d 7d 20 0d 0a 09 26 20 |um 90Mhz|}} ...& |
|00004450| 5c 65 6d 7b 5c 73 6d 61 | 6c 6c 7b 34 38 36 44 58 |\em{\sma|ll{486DX|
|00004460| 34 20 37 35 4d 68 7a 7d | 7d 20 26 20 5c 65 6d 7b |4 75Mhz}|} & \em{|
|00004470| 5c 73 6d 61 6c 6c 7b 34 | 38 36 44 58 2f 32 20 36 |\small{4|86DX/2 6|
|00004480| 36 4d 68 7a 7d 7d 20 5c | 5c 20 5c 68 6c 69 6e 65 |6Mhz}} \|\ \hline|
|00004490| 20 5c 68 6c 69 6e 65 0d | 0a 0d 0a 43 50 55 20 26 | \hline.|...CPU &|
|000044a0| 20 31 36 2e 30 31 38 20 | 26 20 32 38 2e 38 33 33 | 16.018 |& 28.833|
|000044b0| 20 26 20 31 35 2e 37 32 | 37 20 26 20 31 33 2e 38 | & 15.72|7 & 13.8|
|000044c0| 34 30 20 5c 5c 20 5c 68 | 6c 69 6e 65 0d 0a 44 68 |40 \\ \h|line..Dh|
|000044d0| 72 79 73 74 6f 6e 65 73 | 20 26 20 31 39 2e 35 38 |rystones| & 19.58|
|000044e0| 36 20 26 20 32 31 2e 38 | 38 36 20 26 20 31 32 2e |6 & 21.8|86 & 12.|
|000044f0| 30 38 34 20 26 20 39 2e | 34 32 34 20 5c 5c 20 5c |084 & 9.|424 \\ \|
|00004500| 68 6c 69 6e 65 0d 0a 54 | 6f 77 65 72 20 26 09 31 |hline..T|ower &.1|
|00004510| 38 2e 39 30 39 20 26 20 | 32 37 2e 31 33 30 20 26 |8.909 & |27.130 &|
|00004520| 20 31 32 2e 32 33 35 20 | 26 20 31 31 2e 35 35 36 | 12.235 |& 11.556|
|00004530| 20 5c 5c 20 5c 68 6c 69 | 6e 65 0d 0a 51 75 69 63 | \\ \hli|ne..Quic|
|00004540| 6b 73 6f 72 74 20 26 20 | 31 37 2e 37 35 39 20 26 |ksort & |17.759 &|
|00004550| 20 32 37 2e 31 30 35 20 | 26 20 31 35 2e 36 30 36 | 27.105 |& 15.606|
|00004560| 20 26 20 31 33 2e 39 31 | 39 20 5c 5c 20 5c 68 6c | & 13.91|9 \\ \hl|
|00004570| 69 6e 65 0d 0a 42 75 62 | 62 6c 65 20 73 6f 72 74 |ine..Bub|ble sort|
|00004580| 20 26 20 31 38 2e 34 30 | 39 20 26 20 33 31 2e 31 | & 18.40|9 & 31.1|
|00004590| 35 34 20 26 20 31 39 2e | 32 38 36 20 26 20 31 36 |54 & 19.|286 & 16|
|000045a0| 2e 38 37 35 20 5c 5c 20 | 5c 68 6c 69 6e 65 0d 0a |.875 \\ |\hline..|
|000045b0| 51 75 65 65 6e 73 20 26 | 20 31 39 2e 30 38 33 20 |Queens &| 19.083 |
|000045c0| 26 20 33 38 2e 31 36 37 | 20 26 20 31 39 2e 30 38 |& 38.167| & 19.08|
|000045d0| 33 20 26 20 31 38 2e 33 | 32 30 20 5c 5c 20 5c 68 |3 & 18.3|20 \\ \h|
|000045e0| 6c 69 6e 65 0d 0a 50 75 | 7a 7a 6c 65 20 26 20 32 |line..Pu|zzle & 2|
|000045f0| 32 2e 30 38 33 20 26 20 | 34 34 2e 31 36 37 20 26 |2.083 & |44.167 &|
|00004600| 20 32 33 2e 36 36 31 20 | 26 20 32 31 2e 30 33 32 | 23.661 |& 21.032|
|00004610| 20 5c 5c 20 5c 68 6c 69 | 6e 65 0d 0a 50 65 72 6d | \\ \hli|ne..Perm|
|00004620| 75 74 61 74 69 6f 6e 73 | 20 26 20 32 31 2e 30 31 |utations| & 21.01|
|00004630| 39 20 26 20 32 38 2e 35 | 36 34 20 26 20 31 31 2e |9 & 28.5|64 & 11.|
|00004640| 36 30 34 20 26 20 31 32 | 2e 32 34 32 20 5c 5c 20 |604 & 12|.242 \\ |
|00004650| 5c 68 6c 69 6e 65 0d 0a | 49 6e 74 2e 20 4d 61 74 |\hline..|Int. Mat|
|00004660| 72 69 78 20 26 20 32 34 | 2e 32 30 30 20 26 20 32 |rix & 24|.200 & 2|
|00004670| 36 2e 34 36 39 20 26 20 | 31 39 2e 33 36 39 20 26 |6.469 & |19.369 &|
|00004680| 20 31 36 2e 36 30 38 20 | 5c 5c 20 5c 68 6c 69 6e | 16.608 |\\ \hlin|
|00004690| 65 0d 0a 53 69 65 76 65 | 20 26 20 32 33 2e 33 36 |e..Sieve| & 23.36|
|000046a0| 32 20 26 20 36 30 2e 32 | 39 30 20 26 20 33 33 2e |2 & 60.2|90 & 33.|
|000046b0| 39 38 32 20 26 20 33 30 | 2e 31 34 35 20 5c 5c 20 |982 & 30|.145 \\ |
|000046c0| 5c 68 6c 69 6e 65 20 5c | 68 6c 69 6e 65 0d 0a 41 |\hline \|hline..A|
|000046d0| 76 65 72 61 67 65 09 26 | 20 32 30 2e 34 39 30 20 |verage.&| 20.490 |
|000046e0| 26 20 33 33 2e 38 38 31 | 20 26 20 31 38 2e 35 38 |& 33.881| & 18.58|
|000046f0| 32 20 26 20 31 36 2e 36 | 38 30 20 5c 5c 20 5c 68 |2 & 16.6|80 \\ \h|
|00004700| 6c 69 6e 65 0d 0a 5c 65 | 6e 64 7b 74 61 62 75 6c |line..\e|nd{tabul|
|00004710| 61 72 7d 0d 0a 5c 65 6e | 64 7b 63 65 6e 74 65 72 |ar}..\en|d{center|
|00004720| 7d 0d 0a 0d 0a 50 72 65 | 6c 69 6d 69 6e 61 72 79 |}....Pre|liminary|
|00004730| 20 61 6e 61 6c 79 73 69 | 73 20 73 75 67 67 65 73 | analysi|s sugges|
|00004740| 74 73 20 74 68 61 74 20 | 77 65 20 61 76 65 72 61 |ts that |we avera|
|00004750| 67 65 20 61 20 72 6f 75 | 67 68 6c 79 20 33 3a 31 |ge a rou|ghly 3:1|
|00004760| 0d 0a 69 6e 73 74 72 75 | 63 74 69 6f 6e 20 63 6f |..instru|ction co|
|00004770| 75 6e 74 20 69 6e 63 72 | 65 61 73 65 20 77 68 65 |unt incr|ease whe|
|00004780| 6e 20 74 72 61 6e 73 6c | 61 74 69 6e 67 20 74 6f |n transl|ating to|
|00004790| 20 38 30 78 38 36 20 63 | 6f 64 65 2e 20 20 57 65 | 80x86 c|ode. We|
|000047a0| 20 68 61 76 65 0d 0a 6e | 6f 74 20 79 65 74 20 74 | have..n|ot yet t|
|000047b0| 61 6b 65 6e 20 72 69 67 | 6f 72 6f 75 73 20 6d 65 |aken rig|orous me|
|000047c0| 61 73 75 72 65 6d 65 6e | 74 73 2c 20 62 75 74 20 |asuremen|ts, but |
|000047d0| 74 68 65 20 33 3a 31 20 | 66 69 67 75 72 65 20 69 |the 3:1 |figure i|
|000047e0| 73 20 6c 65 6e 74 0d 0a | 73 6f 6d 65 20 63 72 65 |s lent..|some cre|
|000047f0| 64 65 6e 63 65 20 62 79 | 20 74 68 65 20 66 61 63 |dence by| the fac|
|00004800| 74 20 74 68 61 74 20 6f | 75 72 20 37 35 4d 48 7a |t that o|ur 75MHz|
|00004810| 20 34 38 36 44 58 34 20 | 67 65 74 73 20 6e 65 61 | 486DX4 |gets nea|
|00004820| 72 6c 79 20 74 68 65 0d | 0a 73 61 6d 65 20 70 65 |rly the.|.same pe|
|00004830| 72 66 6f 72 6d 61 6e 63 | 65 20 61 73 20 6f 75 72 |rformanc|e as our|
|00004840| 20 51 75 61 64 72 61 20 | 36 31 30 2e 20 20 57 65 | Quadra |610. We|
|00004850| 20 62 65 6c 69 65 76 65 | 20 74 68 61 74 20 69 6e | believe| that in|
|00004860| 74 65 72 2d 62 6c 6f 63 | 6b 0d 0a 72 65 67 69 73 |ter-bloc|k..regis|
|00004870| 74 65 72 20 61 6c 6c 6f | 63 61 74 69 6f 6e 20 77 |ter allo|cation w|
|00004880| 69 6c 6c 20 6e 6f 74 69 | 63 65 61 62 6c 79 20 69 |ill noti|ceably i|
|00004890| 6d 70 72 6f 76 65 20 74 | 68 69 73 20 72 61 74 69 |mprove t|his rati|
|000048a0| 6f 2e 0d 0a 0d 0a 5c 65 | 6e 64 7b 64 6f 63 75 6d |o.....\e|nd{docum|
|000048b0| 65 6e 74 7d 0d 0a 0d 0a | 0d 0a |ent}....|.. |
+--------+-------------------------+-------------------------+--------+--------+