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 607, Mon Apr 10 16:31:03 2000 UTC revision 608, Mon Apr 10 18:57:09 2000 UTC
# Line 1  Line 1 
1  signature C_CALL = sig  (* c-calls.sig
2     *
3    structure T : MLTREE   * COPYRIGHT (c) 2000 Bell Labs, Lucent Technologies
4     *)
   (* multiple calling conventions on a single architecture *)  
 (*  type calling_convention *)  
5    
6    (* prototype describing C function *)  signature C_CALLS =
7    type  c_proto =    sig
     { (* conv : calling_convention, *)  
       retTy : CTypes.c_type,  
       paramTys : CTypes.c_type list  
      }  
8    
9    exception ArgParamMismatch      structure T : MLTREE
10    
11    datatype  c_arg    datatype  c_arg
12      = ARG of T.rexp      = ARG of T.rexp
# Line 23  Line 17 
17      | FARG of T.fexp      | FARG of T.fexp
18          (* fexp specifies floating-point argument *)          (* fexp specifies floating-point argument *)
19      | ARGS of c_arg list      | ARGS of c_arg list
20          (* list of arguments corresponding to  contents of a C struct *)            (* list of arguments corresponding to the contents of a C struct *)
21    
22    (* translate a C function call with the given argument list into    (* translate a C function call with the given argument list into
23     * a MLRISC statement list.  The structRet function is called     * a MLRISC statement list.  The structRet function is called
# Line 34  Line 28 
28     * but some conventions may flatten larger arguments into multiple     * but some conventions may flatten larger arguments into multiple
29     * registers (e.g., a register pair for long long results).     * registers (e.g., a register pair for long long results).
30     *)     *)
31    val genCall :      val genCall : {
32        { name  : T.rexp,              name  : T.rexp,
33          proto : c_proto,              proto : CTypes.c_proto,
34          structRet :  {szb : int, align : int} -> T.rexp,          structRet :  {szb : int, align : int} -> T.rexp,
35          args : c_arg list          args : c_arg list
36         }            } -> {
37        ->              callseq : T.stm list,
       { callseq : T.stm list,  
38          result: T.mlrisc list          result: T.mlrisc list
39         }         }
40    
41  end  end

Legend:
Removed from v.607  
changed lines
  Added in v.608

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