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 /sml/trunk/src/MLRISC/c-calls/c-calls.sig
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/c-calls/c-calls.sig

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

revision 1522, Tue Jul 6 17:09:21 2004 UTC revision 1523, Tue Jul 6 19:48:33 2004 UTC
# Line 19  Line 19 
19        | ARGS of c_arg list        | ARGS of c_arg list
20            (* list of arguments corresponding to the contents of a C struct *)            (* list of arguments corresponding to the contents of a C struct *)
21    
22    (* this constant is the offset from the SP to the low-address of the    (* this constant is the offset from the caller's SP to the low-address of the
23     * parameter area (see the paramAlloc callback below).     * parameter area (see the paramAlloc callback below).
24     *)     *)
25      val paramAreaOffset : int      val paramAreaOffset : int
# Line 56  Line 56 
56     *     *
57     * WARNING: if the client's implementation of structRet uses the stack     * WARNING: if the client's implementation of structRet uses the stack
58     * pointer to address the struct-return area, then paramAlloc should always     * pointer to address the struct-return area, then paramAlloc should always
59     * handle allocating space for the parameter area (i.e., eturn true).     * handle allocating space for the parameter area (i.e., return true).
60     *)     *)
61      val genCall : {      val genCall : {
62              name  : T.rexp,              name  : T.rexp,
# Line 76  Line 76 
76     * low end of the parameter area (see paramAreaOffset above).     * low end of the parameter area (see paramAreaOffset above).
77     *)     *)
78      datatype arg_location      datatype arg_location
79        = Reg of T.ty * T.reg             (* integer/pointer argument in register *)        = Reg of T.ty * T.reg * T.I.machine_int option
80        | FReg of T.fty * T.reg           (* floating-point argument in register *)                                          (* integer/pointer argument in register *)
81          | FReg of T.fty * T.reg * T.I.machine_int option
82                                            (* floating-point argument in register *)
83        | Stk of T.ty * T.I.machine_int   (* integer/pointer argument in parameter area *)        | Stk of T.ty * T.I.machine_int   (* integer/pointer argument in parameter area *)
84        | FStk of T.fty * T.I.machine_int (* floating-point argument in parameter area *)        | FStk of T.fty * T.I.machine_int (* floating-point argument in parameter area *)
85        | Args of arg_location list        | Args of arg_location list
86    
87      val layout : CTypes.c_proto -> {      val layout : CTypes.c_proto -> {
88              args : arg_location list,   (* argument/parameter assignment *)              argLocs : arg_location list,        (* argument/parameter assignment *)
89              res : arg_location option   (* result location; NONE for void functions *)              resLoc : arg_location option,       (* result location; NONE for void functions *)
90                structRet : {szb : int, align : int} option
91            }            }
92    
93    (* Callee-save registers as defined in the C calling convention.  Note that    (* Callee-save registers as defined in the C calling convention.  Note that

Legend:
Removed from v.1522  
changed lines
  Added in v.1523

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