Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/instructions/insnProps.sig
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/instructions/insnProps.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1089 - (view) (download) (as text)

1 : monnier 411 (*
2 :     * Basic Instruction properties that must be supported on all architectures.
3 : monnier 245 *
4 : monnier 411 * -- Allen
5 : monnier 245 *)
6 : monnier 411 signature INSN_PROPERTIES =
7 :     sig
8 : george 889 structure I : INSTRUCTIONS
9 : monnier 245 structure C : CELLS
10 : george 889 sharing I.C = C
11 : monnier 245
12 : monnier 411 (* classify instructions *)
13 :     datatype kind = IK_JUMP (* branches, including returns *)
14 :     | IK_NOP (* no ops *)
15 :     | IK_INSTR (* normal instructions *)
16 :     | IK_COPY (* parallel copy *)
17 :     | IK_CALL (* call instructions *)
18 : leunga 796 | IK_CALL_WITH_CUTS (* call with cut edges *)
19 : monnier 411 | IK_PHI (* A phi node (SSA) *)
20 : leunga 641 | IK_SINK (* A sink node (SSA) *)
21 :     | IK_SOURCE (* A source node (SSA) *)
22 : monnier 245
23 : monnier 411 val instrKind : I.instruction -> kind
24 : monnier 245
25 : monnier 411 (* parallel moves *)
26 :     val moveInstr : I.instruction -> bool
27 : george 889 val moveTmpR : I.instruction -> CellsBasis.cell option
28 :     val moveDstSrc : I.instruction -> CellsBasis.cell list * CellsBasis.cell list
29 : monnier 245
30 : monnier 411 (* no op *)
31 :     val nop : unit -> I.instruction
32 : monnier 245
33 : monnier 411 (* jump instruction *)
34 :     val jump : Label.label -> I.instruction
35 : monnier 245
36 : monnier 411 (* load immediate; must be within immedRange *)
37 : leunga 657 val immedRange : {lo:int, hi:int}
38 : george 889 val loadImmed : {immed:int, t:CellsBasis.cell} -> I.instruction
39 :     val loadOperand : {opn:I.operand, t:CellsBasis.cell} -> I.instruction
40 : monnier 245
41 : monnier 411 (*
42 :     * Targets of a branch instruction
43 :     * precondition: instruction must be of type IK_JUMP.
44 :     *)
45 :     datatype target = LABELLED of Label.label | FALLTHROUGH | ESCAPES
46 : monnier 245 val branchTargets : I.instruction -> target list
47 :    
48 : jhr 1089 (* Set the branch target; no effect if not a branch instruction. For
49 :     * conditional branches, both the true and false targets must be specified.
50 :     *)
51 : monnier 245 val setTargets : I.instruction * Label.label list -> I.instruction
52 : monnier 411
53 :     (* equality and hashing on operands *)
54 :     val eqOpn : I.operand * I.operand -> bool
55 :     val hashOpn : I.operand -> word
56 : monnier 245
57 : jhr 1082 (* Given a conditional jump instruction and label, return a conditional
58 :     * jump that has the complimentary condition and that targets the given
59 :     * label. If the given instruction is not a conditional jump, then
60 :     * the NegateConditional exception is raised.
61 :     *)
62 :     exception NegateConditional
63 :     val negateConditional : (I.instruction * Label.label) -> I.instruction
64 : monnier 245
65 : monnier 411 (* definition/use for the RA *)
66 : george 889 val defUse : CellsBasis.cellkind ->
67 :     I.instruction -> (CellsBasis.cell list * CellsBasis.cell list)
68 : monnier 245
69 : monnier 411 (* annotations *)
70 : monnier 469 val getAnnotations : I.instruction ->
71 :     I.instruction * Annotations.annotation list
72 : monnier 411 val annotate : I.instruction * Annotations.annotation -> I.instruction
73 : leunga 657
74 :     val replicate : I.instruction -> I.instruction
75 : monnier 411 end
76 : monnier 245

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0