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/c-call/test/c-test-gen.sml
ViewVC logotype

Diff of /MLRISC/trunk/c-call/test/c-test-gen.sml

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

revision 3185, Tue Aug 5 22:40:13 2008 UTC revision 3186, Tue Aug 5 22:44:16 2008 UTC
# Line 356  Line 356 
356      val pty12 = [CTy.C_STRUCT [CTy.C_PTR, CTy.C_PTR, CTy.C_PTR, CTy.C_PTR, CTy.C_PTR, CTy.C_PTR, CTy.C_PTR, CTy.C_PTR]]      val pty12 = [CTy.C_STRUCT [CTy.C_PTR, CTy.C_PTR, CTy.C_PTR, CTy.C_PTR, CTy.C_PTR, CTy.C_PTR, CTy.C_PTR, CTy.C_PTR]]
357      val pty13 = [CTy.C_float, CTy.C_double]      val pty13 = [CTy.C_float, CTy.C_double]
358    
359      fun main _ = BackTrace.monitor (fn () => let      fun main _ = (*BackTrace.monitor (fn () => *) (let
360        (* choose the prototype to test *)        (* choose the prototype to test *)
361          val retTy = CTy.C_signed CTy.I_int          val retTy = CTy.C_void
362          val paramTys = pty6          val paramTys = pty10
363    
364          val cArgs = List.map genRandArg paramTys          val cArgs = List.map genRandArg paramTys
365          val retVal = if retTy <> CTy.C_void then [genRandArg retTy] else []          val retVal = if retTy <> CTy.C_void then [genRandArg retTy] else []
# Line 391  Line 391 
391          val szB = Int.max(wordSzB, maxSzOfProto proto)          val szB = Int.max(wordSzB, maxSzOfProto proto)
392          val (_, glueArgs) = List.foldl (genGlueArg szB tmpR) (0, []) paramTys          val (_, glueArgs) = List.foldl (genGlueArg szB tmpR) (0, []) paramTys
393          val asmOutStrm = TextIO.openOut "mlrisc.s"          val asmOutStrm = TextIO.openOut "mlrisc.s"
394          fun doit () = codegen(mlriscGlue, target, proto, [T.MV(wordTy, tmpReg, param0)], List.rev glueArgs)          fun doit () = codegen(mlriscGlue, target, proto, [T.MV(32, tmpReg, param0)], List.rev glueArgs)
395          val _ = AsmStream.withStream asmOutStrm doit ()          val _ = AsmStream.withStream asmOutStrm doit ()
396          val _ = TextIO.closeOut asmOutStrm          val _ = TextIO.closeOut asmOutStrm
397          in          in

Legend:
Removed from v.3185  
changed lines
  Added in v.3186

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