File:  [gforth] / gforth / peeprules.vmg
Revision 1.21: download - view: text, annotated - select for diffs
Mon Dec 31 19:02:24 2007 UTC (16 years, 2 months ago) by anton
Branches: MAIN
CVS tags: v0-7-0, HEAD
updated copyright year after changing license notice

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>