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

SCM Repository

[smlnj] Diff of /MLRISC/trunk/staged-allocation/staged-allocation-sig.sml
ViewVC logotype

Diff of /MLRISC/trunk/staged-allocation/staged-allocation-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3009, Tue Apr 29 00:36:12 2008 UTC revision 3010, Wed Apr 30 00:42:37 2008 UTC
# Line 19  Line 19 
19    
20  (* Specify the language that we wish to call. *)  (* Specify the language that we wish to call. *)
21  signature TARGET_LANG = sig  signature TARGET_LANG = sig
22      type location_kind     (* kind of location for passing arguments, e.g., general-purpose register,      type location_kind     (* kind of location for passing arguments, e.g., general-purpose
23                              * floating-point register, memory, etc. *)                              * registers, floating-point registers, memory, etc. *)
24  end (* TARGET_LANG *)  end (* TARGET_LANG *)
25    
26  signature STAGED_ALLOCATION =  signature STAGED_ALLOCATION =
# Line 39  Line 39 
39      (* locations consist of machine registers, offsets in to overflow blocks, combinations of      (* locations consist of machine registers, offsets in to overflow blocks, combinations of
40       * locations, and narrowed locations.       * locations, and narrowed locations.
41       *)       *)
42      datatype location =      datatype location
43               REG of reg        = REG of reg
44             | BLOCK_OFFSET of int             | BLOCK_OFFSET of int
45             | COMBINE of (location * location)             | COMBINE of (location * location)
46             | NARROW of (location * width * TL.location_kind)             | NARROW of (location * width * TL.location_kind)
# Line 49  Line 49 
49      type location_info = (width * location * TL.location_kind)      type location_info = (width * location * TL.location_kind)
50    
51      (* language for specifying calling conventions *)      (* language for specifying calling conventions *)
52      datatype stage =      datatype stage
53               OVERFLOW of {        = OVERFLOW of {                                (* overflow block (usually corresponds to a runtime stack) *)
54                   counter : counter,                   counter : counter,
55                   blockDirection : block_direction,                   blockDirection : block_direction,
56                   maxAlign : int                   maxAlign : int
57               }               }
58             | WIDEN of (width -> width)             | WIDEN of (width -> width)
59             (* choose the first stage whose corresponding predicate is true. *)        | CHOICE of ( (slot -> bool) * stage) list     (* choose the first stage whose corresponding
60             | CHOICE of ( (slot -> bool) * stage) list                                                        * predicate is true. *)
61             (* the first n arguments go into the first n registers *)        | REGS_BY_ARGS of (counter * reg list)         (* the first n arguments go into the first n
62             | REGS_BY_ARGS of (counter * reg list)                                                        * registers *)
63             | ARGCOUNTER of counter             | ARGCOUNTER of counter
64             (* the first n bits arguments go into the first n bits of registers *)        | REGS_BY_BITS of (counter * reg list)         (* the first n bits arguments go into the first
65             | REGS_BY_BITS of (counter * reg list)                                                        * n bits of registers *)
66             | BITCOUNTER of counter             | BITCOUNTER of counter
67             (* sequence of stages *)        | SEQ of stage list                            (* sequence of stages *)
68             | SEQ of stage list        | PAD of counter                               (* specifies an alignment (this rule applies even
69             (* specifies an alignment (this rule applies even for registers) *)                                                        * for registers) *)
70             | PAD of counter        | ALIGN_TO of (width -> width)                 (* specifies an alignment *)
            (* specifies an alignment *)  
            | ALIGN_TO of (width -> width)  
71    
72      (* indicates that the call-generation process has encountered an error *)      (* indicates that the call-generation process has encountered an error *)
73      exception StagedAlloc      exception StagedAlloc

Legend:
Removed from v.3009  
changed lines
  Added in v.3010

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