[gforth] / gforth / peeprules.vmg  

gforth: gforth/peeprules.vmg


1 : anton 1.14 \ Gforth superinstructions and stack caching replicas
2 :    
3 :     \ Copyright (C) 2003 Free Software Foundation, Inc.
4 :    
5 :     \ This file is part of Gforth.
6 :    
7 :     \ Gforth is free software; you can redistribute it and/or
8 :     \ modify it under the terms of the GNU General Public License
9 :     \ as published by the Free Software Foundation; either version 2
10 :     \ of the License, or (at your option) any later version.
11 :    
12 :     \ This program is distributed in the hope that it will be useful,
13 :     \ but WITHOUT ANY WARRANTY; without even the implied warranty of
14 :     \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 :     \ GNU General Public License for more details.
16 :    
17 :     \ You should have received a copy of the GNU General Public License
18 :     \ along with this program; if not, write to the Free Software
19 :     \ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
20 :    
21 : anton 1.8 \ taken from David Gregg's EuroForth 2001 paper; omitted some sequences
22 : anton 1.12 \ eliminated for gforth-native:
23 :     \ 1) sequences containing call
24 :     \ 2) sequences with immediate arguments not in the first position
25 : anton 1.7 super1 = lit +
26 : anton 1.12 \ super2 = lit call
27 : anton 1.7 super3 = lit @
28 : anton 1.12 \ super4 = lit @ call
29 :     \ super5 = @ call
30 : anton 1.8 super6 = lit !
31 : anton 1.12 \ super7 = lit lit
32 :     \ super8 = dup lit
33 :     \ super9 = ! lit
34 :     \ super10 = lit ! lit
35 : anton 1.8 super11 = ! ;s
36 :     super12 = lit + @
37 : anton 1.12 \ super13 = 0= ?branch
38 :     \ super14 = dup call
39 : anton 1.8 super15 = useraddr @
40 :     super16 = + @
41 : anton 1.12 \ super17 = lit @ ?branch
42 : anton 1.8 super18 = lit ! ;s
43 :     super19 = lit @ and
44 : anton 1.13 \ super20 = = ?branch
45 : anton 1.12 \ super21 = lit lit !
46 :     \ super22 = @ ?branch
47 : anton 1.8 super23 = useraddr !
48 : anton 1.12 \ super24 = dup ?branch
49 : anton 1.8 super25 = @ ;s
50 :     super26 = lit @ +
51 :     super27 = dup @
52 : anton 1.9
53 : anton 1.11 \F 0 [if]
54 : anton 1.9
55 : anton 1.10 \ \ \E prim-states ;s \ 2950159
56 :     \ \E prim-states lit \ 2802835
57 :     \ \ \E prim-states call \ 2558373
58 :     \ \E prim-states @ \ 2244351
59 :     \ \E branch-states ?branch \ 1134432
60 :     \ \E prim-states lit@ \ 1051813
61 :     \ \E prim-states swap \ 737988
62 : anton 1.11 \ \ \E S0 S2 state-prim swap
63 :     \ \ \E S1 S2 state-prim swap
64 :     \ \ \E S2 S3 state-prim swap
65 :     \ \ \E S3 S2 state-prim swap
66 : anton 1.10 \ \E prim-states c@ \ 651406
67 :     \ \E prim-states = \ 590006
68 :     \ \E prim-states 0= \ 584487
69 :     \ \E prim-states dup \ 566855
70 :     \ \E S0 S1 state-prim dup
71 :     \ \E prim-states + \ 566003
72 :     \ \E prim-states i \ 502908
73 :     \ \E prim-states +! \ 448925
74 :     \ \ \E prim-states branch \ 409561
75 :     \ \ \E prim-states (loop) \ 379646
76 :     \ \ \E prim-states lp! \ 326743
77 :     \ \E prim-states and \ 309427
78 :     \ \E prim-states useraddr \ 303254
79 :     \ \E prim-states over \ 283556
80 :     \ \E S0 S1 state-prim over
81 : anton 1.11 \ \ \E S1 S2 state-prim over
82 :     \ \ \E S2 S1 state-prim over
83 :     \ \ \E S3 S2 state-prim over
84 : anton 1.10 \ \E prim-states negate \ 257417
85 :     \ \E prim-states cells \ 254644
86 :     \ \E prim-states rot \ 220273
87 : anton 1.11 \ \ \E S3 S1 state-prim rot
88 :     \ \ \E S2 S3 state-prim rot
89 :     \ \ \E S1 S3 state-prim rot
90 :     \ \ \E S0 S3 state-prim rot
91 : anton 1.10 \ \E prim-states ! \ 218672
92 :     \ \E prim-states 2dup \ 211315
93 : anton 1.11 \ \E S0 S1 state-prim 2dup
94 :     \ \ \E S0 S2 state-prim 2dup
95 :     \ \ \E S1 S3 state-prim 2dup
96 :     \ \ \E S2 S2 state-prim 2dup
97 :     \ \ \E S3 S1 state-prim 2dup
98 : anton 1.10 \ \ \E branch-states lit-perform \ 188331
99 :     \ \E prim-states <> \ 179502
100 :     \ \E prim-states c! \ 179332
101 :     \ \E prim-states lit+ \ 179156
102 :     \ \E prim-states drop \ 173995
103 :     \ \E S0 S0 state-prim drop
104 :     \ \E prim-states lshift \ 164671
105 :     \ \E prim-states /mod \ 164670
106 :     \ \E prim-states >r \ 145247
107 :     \ \E prim-states r> \ 133792
108 :     \ \ \E branch-states does-exec \ 120944
109 :     \ \E prim-states cell+ \ 116183
110 :     \ \E prim-states lp+!# \ 106697 \ --
111 :     \ \E prim-states - \ 106245
112 :     \ \E prim-states unloop \ 98938 \ --
113 :     \ \E prim-states lp+ \ 87190 \ --
114 :     \ \E prim-states >= \ 80994
115 :     \ \E prim-states tuck \ 78696
116 : anton 1.11 \ \ \E S2 S2 state-prim tuck
117 : anton 1.10 \ \E prim-states /string \ 78595
118 :     \ \E prim-states char+ \ 77542
119 :     \ \ \E prim-states ?dup \ 76850
120 :     \ \E prim-states @local0 \ 75322
121 :     \ \E prim-states min \ 75264
122 :     \ \ \E prim-states compare \ 65603
123 :     \ \E branch-states (u+do) \ 63823
124 :     \ \ \E prim-states (read-line) \ 63823
125 :     \ \E prim-states 2>r \ 62646
126 :     \ \E prim-states 2r> \ 62644
127 :     \ \E prim-states 2r@ \ 61338
128 :     \ \E prim-states 2@ \ 61067
129 :     \ \E prim-states nip \ 54961
130 :     \ \E S1 S1 state-prim nip
131 :     \ \E S0 S1 state-prim nip
132 :     \ \E prim-states within \ 51075
133 :     \ \E prim-states 1- \ 47441
134 :     \ \E branch-states execute \ 46674
135 :     \ \E prim-states lp- \ 45385
136 :     \ \E branch-states perform \ 38756
137 :     \ \E prim-states xor \ 35599
138 :     \ \E prim-states @local# \ 34586
139 :     \ \ \E prim-states pick \ 32015
140 :     \ \E prim-states u> \ 29373
141 :     \ \E prim-states -rot \ 26211
142 : anton 1.11 \ \ \E S3 S2 state-prim -rot
143 :     \ \ \E S1 S3 state-prim -rot
144 : anton 1.10 \ \E prim-states 2drop \ 25418
145 :     \ \E S0 S0 state-prim 2drop
146 :     \ \E S1 S0 state-prim 2drop
147 :     \ \ \E prim-states (tablelfind) \ 22243
148 :     \ \E prim-states or \ 21587
149 :     \ \E prim-states @local2 \ 20859
150 :     \ \E branch-states (+loop) \ 20006
151 :     \ \E prim-states 1+ \ 17944
152 :     \ \E prim-states rdrop \ 17902
153 :     \ \E branch-states (?do) \ 17348
154 :     \ \E prim-states max \ 16948
155 :     \ \E prim-states 2* \ 15606
156 :     \ \ \E prim-states filename-match \ 15003
157 :     \ \ \E prim-states (listlfind) \ 13074
158 :     \ \ \E prim-states sp@ \ 12741
159 :     \ \ \E prim-states fp@ \ 12384
160 :     \ \ \E prim-states um/mod \ 12288
161 :     \ \E prim-states 2! \ 11904
162 :     \ \ \E prim-states fill \ 10781
163 :     \ \ \E prim-states (parse-white) \ 10624
164 :     \ \E branch-states (do) \ 10516
165 :     \ \ \E prim-states (hashkey1) \ 10239
166 :     \ \E prim-states u< \ 9602
167 :     \ \ \E prim-states write-file \ 8973
168 :     \ \E prim-states count \ 8873
169 :     \ \ \E prim-states rp@ \ 8410
170 :     \ \E prim-states 0< \ 8380
171 :     \ \E prim-states < \ 7741
172 :     \ \E prim-states @local1 \ 7458
173 :     \ \ \E prim-states move \ 7050
174 :     \ \E prim-states u>= \ 6138
175 :     \ \E branch-states (+do) \ 5863
176 :     \ \ \E prim-states va-return-double \ 5517
177 :     \ \E prim-states um* \ 5342
178 :     \ \E prim-states toupper \ 3517
179 :     \ \ \E prim-states f@local1 \ 2907
180 :     \ \ \E prim-states rp! \ 2859
181 :     \ \ \E prim-states ?dup-?branch \ 2829
182 :     \ \E prim-states d+ \ 2671
183 :     \ \ \E prim-states ftuck \ 2636
184 :     \ \ \E prim-states read-file \ 2623
185 :     \ \ \E prim-states ms \ 2454
186 :     \ \ \E prim-states (s+loop) \ 2429
187 :     \ \ \E prim-states allocate \ 1869
188 :     \ \E prim-states * \ 1520
189 :     \ \E prim-states 0<> \ 925
190 :     \ \ \E prim-states noop \ 715
191 :     \ \E prim-states aligned \ 714
192 :     \ \E prim-states u<= \ 684
193 :     \ \E prim-states i' \ 684
194 :     \ \E prim-states > \ 411
195 :     \ \ \E prim-states (hashlfind) \ 397
196 :     \ \E prim-states 2swap \ 336
197 : anton 1.11 \ \ \E S0 S3 state-prim 2swap
198 :     \ \ \E S1 S3 state-prim 2swap
199 : anton 1.10 \ \E prim-states laddr# \ 335
200 :     \ \ \E prim-states faxpy \ 286
201 :     \ \ \E prim-states (next) \ 272
202 :     \ \ \E prim-states (-loop)-lp+!# \ 248
203 :     \ \E prim-states <= \ 199
204 :     \ \E prim-states invert \ 170
205 :     \ \E branch-states (-do) \ 169
206 :     \ \E prim-states 2over \ 165
207 : anton 1.11 \ \ \E S0 S2 state-prim 2over
208 :     \ \ \E S1 S3 state-prim 2over
209 : anton 1.10 \ \E prim-states under+ \ 154
210 :     \ \E prim-states dnegate \ 128
211 :     \ \E prim-states u<> \ 128
212 :     \ \E prim-states 0> \ 122
213 :     \ \ \E prim-states (loop)-lp+!# \ 118
214 :     \ \E prim-states j \ 117
215 :     \ \E prim-states float+ \ 78
216 :     \ \ \E prim-states (for) \ 68
217 :     \ \E prim-states 2rdrop \ 60 \ --
218 :     \ \ \E prim-states f! \ 14
219 :     \ \E prim-states >l \ 14
220 :     \ \ \E prim-states close-file \ 5
221 :     \ \ \E prim-states call-c \ 4
222 :     \ \ \E prim-states reposition-file \ 3
223 :     \ \E prim-states / \ 3
224 :     \ \ \E prim-states resize-file \ 2
225 :     \ \ \E prim-states free \ 2
226 :     \ \E prim-states 2/ \ 2
227 :     \ \ \E prim-states up! \ 1
228 :     \ \ \E prim-states stdin \ 1
229 :     \ \ \E prim-states key?-file \ 1
230 :     \ \ \E prim-states flush-icache \ 1
231 :     \ \ \E prim-states cmove \ 1
232 :     \ \ \E prim-states (system) \ 1
233 : anton 1.9
234 : anton 1.10 \ \E ' noop is output-nextp0
235 :     \ \E ' noop is output-nextp1
236 : anton 1.9
237 : anton 1.10 \ \E gen-transitions noop
238 : anton 1.9
239 : anton 1.11 \F [ENDIF]

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help