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

SCM Repository

[smlnj] View of /sml/trunk/src/MLRISC/c-calls/c-calls.sig
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 608 - (download) (as text) (annotate)
Mon Apr 10 18:57:09 2000 UTC (19 years, 4 months ago) by george
File size: 1294 byte(s)
MLRISC.cm
(* c-calls.sig
 *
 * COPYRIGHT (c) 2000 Bell Labs, Lucent Technologies
 *)

signature C_CALLS =
  sig

    structure T : MLTREE

    datatype c_arg 
      = ARG of T.rexp	
	  (* rexp specifies integer or pointer; if the 
           * corresponding parameter is a C struct, then 
	   * this argument is the address of the struct. 
	   *)
      | FARG of T.fexp
	  (* fexp specifies floating-point argument *)
      | ARGS of c_arg list
	  (* list of arguments corresponding to the contents of a C struct *)

  (* translate a C function call with the given argument list into
   * a MLRISC statement list.  The structRet function is called
   * to allocate space for returning a C struct.  The result of
   * genCall is a mlrisc list specifying where the result is and the
   * MLRisc statements that implement the calling sequence.  Functions
   * with void return type have no result, most others have one result,
   * but some conventions may flatten larger arguments into multiple
   * registers (e.g., a register pair for long long results).
   *)
    val genCall : {
	    name  : T.rexp,
            proto : CTypes.c_proto,
            structRet : {szb : int, align : int} -> T.rexp,
            args : c_arg list
	  } -> {
	    callseq : T.stm list,
	    result: T.mlrisc list
	  }

  end

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