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/vararg-ccall/vararg.c
ViewVC logotype

Diff of /MLRISC/trunk/vararg-ccall/vararg.c

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

revision 3062, Wed Jun 4 06:59:52 2008 UTC revision 3063, Thu Jun 5 00:42:15 2008 UTC
# Line 17  Line 17 
17    struct varargs_s* tl;    struct varargs_s* tl;
18  };  };
19    
20  int vararg (void* cFun, struct varargs_s* args, int stkSz)  extern int varargs (void* cFun, struct varargs_s* args, int stkSz);
21    
22    int vararg_wrapper (void* cFun, struct varargs_s* args, int stkSz)
23  {  {
24    printf ("vararg cFun=%p args=%p\n", cFun, vararg);    printf ("vararg cFun=%p args=%p, stkSz=%d\n", cFun, varargs, stkSz);
25    while (args) {    struct varargs_s* tmp_args = args;
26      struct vararg_s* hd = args->hd;    while (tmp_args) {
27        struct vararg_s* hd = tmp_args->hd;
28      printf ("arg=%s kind=%d loc=%d ty=%d\n", hd->arg.s, (int)hd->kind, (int)hd->loc, (int)hd->ty);      printf ("arg=%s kind=%d loc=%d ty=%d\n", hd->arg.s, (int)hd->kind, (int)hd->loc, (int)hd->ty);
29      args = args->tl;      tmp_args = tmp_args->tl;
30    }    }
31      int x = varargs(cFun, args, stkSz);
32    return 0;    return 0;
33  }  }

Legend:
Removed from v.3062  
changed lines
  Added in v.3063

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