1sig absparc.
2accum_sig kitty.
3% abstract sparc assembly language
4
5kind instruction type.
6
7kind store type.
8
9type reg string -> int -> store. % e.g. reg "l" 0   %l0
10type sreg string -> store.  % special register like fp.
11type basicop string -> store -> store -> store -> instruction.
12type movop store -> store -> instruction.
13type branchop string -> store -> instruction.
14type indirect store -> store -> store.   % second store is offset.
15type instseq (list instruction) -> instruction.
16type ilabel string -> instruction.
17type slabel string -> store.
18type conststore int -> store.
19type nullstore store.
20type killmeop instruction.  % to be deleted later.
21type nullop instruction.
22type permstore int -> texp -> store -> o.
23% in basicop, third store is always destination.
24% nullstore used to fill in unused slots.
25type lexlevel int -> o.
26type asciz store -> string -> instruction.
27type extractstr int -> (list instruction) -> (list instruction) -> (list instruction) -> o.
28type optimizes1 (list instruction) -> (list instruction) -> o.
29
30% set macro used in place of sethi, or lo
31% sethi, orlo are basic ops in this language
32
33
34% for the code generator:
35
36type assoces texp -> store -> o.
37
38% associates storage with expression.  Use "dummyexp" to indicate freeness.
39%assoc A dummyexp.   % default.
40% string associations are (assoc  (slabel "string1") (stringexp "hello")).
41
42type gettemp, getstore, getlocal store -> o.  % find empty store.
43%getstore could return either a (reg t n) or a
44
45type freestore, localstore store -> o.   % static list.
46
47type gencode int -> int -> kexp -> store -> (list instruction) -> o.
48type ifelse o -> o -> o -> o.
49
50type genloadop texp -> store -> instruction -> o.
51type ifimpk o -> store -> o -> o.
52
53
54
55
56
57