[gforth] / gforth / cache1.vmg  

gforth: gforth/cache1.vmg


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

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help