[gforth] / gforth / cache-fast1.vmg  

gforth: gforth/cache-fast1.vmg


1 : anton 1.1 \ stack cache setup
2 :    
3 : anton 1.4 \ Copyright (C) 2003,2004,2005,2006 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 :     \ 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 :     \E register IPTOS Cell
22 :     \E register spTOS Cell
23 :     \E register spb Cell
24 :     \E register spc Cell
25 :     \E register spd Cell
26 :     \E register spe Cell
27 :     \E register spf Cell
28 :     \E register spg Cell
29 :     \E register sph Cell
30 :    
31 : anton 1.5 \E register fpTOS Float
32 :    
33 : anton 1.1 \E create IPregs IPTOS ,
34 :     \E create regs sph , spg , spf , spe , spd , spc , spb , spTOS ,
35 :     \ \E create regs spTOS ,
36 : anton 1.5 \E create fpregs fpTOS ,
37 : anton 1.1
38 :     \E IPregs 1 0 stack-state IPss1
39 :     \E regs 8 cells + 0 -1 stack-state ss0
40 :     \E regs 7 cells + 1 0 stack-state ss1
41 :     \E regs 6 cells + 2 1 stack-state ss2
42 :     \E regs 5 cells + 3 2 stack-state ss3
43 :     \E regs 4 cells + 4 3 stack-state ss4
44 :     \E regs 3 cells + 5 4 stack-state ss5
45 :     \E regs 2 cells + 6 5 stack-state ss6
46 :     \E regs 1 cells + 7 6 stack-state ss7
47 :     \E regs 0 cells + 8 7 stack-state ss8
48 :     \ \E regs 1 cells + 0 -1 stack-state ss0
49 :     \ \E regs 1 0 stack-state ss1
50 : anton 1.5 \E fpregs 0 cells + 1 0 stack-state fpss1
51 : anton 1.1
52 :     \ the first of these is the default state (for now)
53 :     \E state S1
54 :     \E state S0
55 :     \E state S2
56 :     \E state S3
57 :     \E state S4
58 :     \E state S5
59 :     \E state S6
60 :     \E state S7
61 :     \E state S8
62 :    
63 : anton 1.3 \E S3 state-disable
64 :     \E S4 state-disable
65 :     \E S5 state-disable
66 :     \E S6 state-disable
67 :     \E S7 state-disable
68 :     \E S8 state-disable
69 :    
70 : anton 1.1 \E ss0 data-stack S0 set-ss
71 :     \E ss1 data-stack S1 set-ss
72 :     \E ss2 data-stack S2 set-ss
73 :     \E ss3 data-stack S3 set-ss
74 :     \E ss4 data-stack S4 set-ss
75 :     \E ss5 data-stack S5 set-ss
76 :     \E ss6 data-stack S6 set-ss
77 :     \E ss7 data-stack S7 set-ss
78 :     \E ss8 data-stack S8 set-ss
79 :    
80 :     \E IPss1 inst-stream S0 set-ss
81 :     \E IPss1 inst-stream S1 set-ss
82 :     \E IPss1 inst-stream S2 set-ss
83 :     \E IPss1 inst-stream S3 set-ss
84 :     \E IPss1 inst-stream S4 set-ss
85 :     \E IPss1 inst-stream S5 set-ss
86 :     \E IPss1 inst-stream S6 set-ss
87 :     \E IPss1 inst-stream S7 set-ss
88 :     \E IPss1 inst-stream S8 set-ss
89 :    
90 : anton 1.5 \E fpss1 fp-stack S0 set-ss
91 :     \E fpss1 fp-stack S1 set-ss
92 :     \E fpss1 fp-stack S2 set-ss
93 :     \E fpss1 fp-stack S3 set-ss
94 :     \E fpss1 fp-stack S4 set-ss
95 :     \E fpss1 fp-stack S5 set-ss
96 :     \E fpss1 fp-stack S6 set-ss
97 :     \E fpss1 fp-stack S7 set-ss
98 :     \E fpss1 fp-stack S8 set-ss
99 :    
100 : anton 1.1 \E data-stack to cache-stack
101 :     \E here 9 cache-states 2! s0 , s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 ,
102 :     \ \E here 2 cache-states 2! s0 , s1 ,
103 :    
104 :     \ !! the following should be automatic
105 :     \E S1 to state-default
106 :     \E state-default to state-in
107 :     \E state-default to state-out

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help