| 1 |
(* instructions.sig |
| 2 |
* |
| 3 |
* COPYRIGHT (c) 2002 Bell Labs, Lucent Technologies. |
| 4 |
* |
| 5 |
* This signature specifies the abstract view of an instruction. |
| 6 |
*) |
| 7 |
|
| 8 |
signature INSTRUCTIONS = |
| 9 |
sig |
| 10 |
structure C : CELLS |
| 11 |
structure CB : CELLS_BASIS (* = CellsBasis *) |
| 12 |
where type CellSet.cellset = CellsBasis.CellSet.cellset |
| 13 |
and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table |
| 14 |
and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table |
| 15 |
and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells |
| 16 |
and type cell = CellsBasis.cell |
| 17 |
and type cellColor = CellsBasis.cellColor |
| 18 |
and type cellkind = CellsBasis.cellkind |
| 19 |
and type cellkindDesc = CellsBasis.cellkindDesc |
| 20 |
and type cellkindInfo = CellsBasis.cellkindInfo |
| 21 |
type operand (* operands supported by architecture *) |
| 22 |
type addressing_mode (* addressing mode *) |
| 23 |
type ea (* effective address for accessing memory *) |
| 24 |
type instr (* architecture instructions *) |
| 25 |
|
| 26 |
datatype instruction = (* partially abstract *) |
| 27 |
LIVE of {regs: C.cellset, spilled: C.cellset} |
| 28 |
| KILL of {regs: C.cellset, spilled: C.cellset} |
| 29 |
| COPY of |
| 30 |
{k: CB.cellkind, |
| 31 |
sz: int, (* in bits *) |
| 32 |
dst: CB.cell list, |
| 33 |
src: CB.cell list, |
| 34 |
tmp: ea option (* = NONE if |dst| = |src| = 1 *) |
| 35 |
} |
| 36 |
| ANNOTATION of {i: instruction, a: Annotations.annotation} |
| 37 |
| INSTR of instr |
| 38 |
end |