Are you not supposed to be able to call a FastCC function from a CCC function? I'm calling a CCC "main" function from OCaml and that "main" function calls internal functions that require tail calls. With CCC everywhere it works (except I don't get tail calls). If I use FastCC on all functions except "main" then the function arguments are garbage. Should I be doing something explicit in order to mix calling conventions? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e
On Dec 17, 2008, at 9:14 PM, Jon Harrop wrote:> > Are you not supposed to be able to call a FastCC function from a CCC > function? > > I'm calling a CCC "main" function from OCaml and that "main" > function calls > internal functions that require tail calls. With CCC everywhere it > works > (except I don't get tail calls). If I use FastCC on all functions > except "main" then the function arguments are garbage. > > Should I be doing something explicit in order to mix calling > conventions?There is nothing special you need to do. The only thing to be careful of is that the callee and call instruction must both have the same calling convention set on them. -Chris
On Thursday 18 December 2008 05:17:06 Chris Lattner wrote:> There is nothing special you need to do. The only thing to be > careful of is that the callee and call instruction must both have the > same calling convention set on them.Ah, ok I wasn't setting the calling convention on the calls, just on the functions. Wonderful, I think I've figured this out now... :-) Thanks, -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e