Annotation of gforth/cache0.vmg, revision 1.4
1.1 anton 1: \ stack cache setup
2:
1.3 anton 3: \ Copyright (C) 2003,2007 Free Software Foundation, Inc.
1.1 anton 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
1.4 ! anton 9: \ as published by the Free Software Foundation, either version 3
1.1 anton 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
1.4 ! anton 18: \ along with this program. If not, see http://www.gnu.org/licenses/.
1.1 anton 19:
20: \E register IPTOS Cell
21: \E register spa Cell
22: \E register spb Cell
23: \E register spc Cell
24: \E register spd Cell
25:
26: \E create IPregs IPTOS ,
27: \E create regs spc , spb , spa ,
28:
29: \E IPregs 1 0 stack-state IPss1
1.2 anton 30: \E regs 3 th 0 0 stack-state ss0
31: \E regs 2 th 1 0 stack-state ss1
32: \E regs 1 th 2 1 stack-state ss2
33: \E regs 0 th 3 2 stack-state ss3
1.1 anton 34:
35: \ the first of these is the default state
36: \E state S0
37: \E state S1
38: \E state S2
39: \E state S3
40:
41: \E ss0 data-stack S0 set-ss
42: \E ss1 data-stack S1 set-ss
43: \E ss2 data-stack S2 set-ss
44: \E ss3 data-stack S3 set-ss
45:
46: \E IPss1 inst-stream S0 set-ss
47: \E IPss1 inst-stream S1 set-ss
48: \E IPss1 inst-stream S2 set-ss
49: \E IPss1 inst-stream S3 set-ss
50:
51: \E data-stack to cache-stack
52: \E here 4 cache-states 2! s0 , s1 , s2 , s3 ,
53:
54: \ !! the following should be automatic
55: \E S0 to state-default
56: \E state-default to state-in
57: \E state-default to state-out
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>