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 777 - (download) (as text) (annotate)
Fri Jan 12 12:17:38 2001 UTC (21 years, 8 months ago) by blume
File size: 1294 byte(s)
syncing with my private branch
(* c-calls.sig
 * COPYRIGHT (c) 2000 Bell Labs, Lucent Technologies

signature C_CALLS =

    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


ViewVC Help
Powered by ViewVC 1.0.0