<div class="gmail_quote">On 8 June 2011 17:20, Anderson, Todd A <span dir="ltr"><<a href="mailto:todd.a.anderson@intel.com">todd.a.anderson@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div lang="EN-US" link="blue" vlink="purple"><div><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">I’ve been tinkering around with some llvm assembly trying out some of the GC related features.  When I add a call to @llvm.gcroot, it is consistently acting like it doesn’t know what that function is.  I’m just getting started so it is probably something small and simple but some googling didn’t yield much in the  way of an answer.  Any help is appreciated.</span></p>

</div></div></div></blockquote><div><br></div><div>Intrinsic functions still need declarations. If you take a look at <a href="http://llvm.org/docs/LangRef.html#int_gcroot">http://llvm.org/docs/LangRef.html#int_gcroot</a> and copy the declaration listed under "syntax" to the top of your .ll file, then it will assemble with llvm-as.</div>

<div><br></div><div>Nick</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="EN-US" link="blue" vlink="purple">

<div><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> </span><span class="Apple-style-span" style="color: rgb(31, 73, 125); font-size: 15px; ">Thanks,</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Todd<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">----------------------------------------------------<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">llvm-as: test1.s:12:13: error: use of undefined value '@llvm.gcroot'<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">  call void @llvm.gcroot(i8** %p, i8* null)<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">define void @foo() gc "tgc" {<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">  %p = alloca i8*, align 4<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">  %1 = load i8** %p, align 4<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">  call void @llvm.gcroot(i8** %p, i8* null)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">  ret void<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">}<u></u><u></u></span></p></div></div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br>