<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Tyler,<div><br></div><div>I think you might be looking for a JIT in ARM architecture. It seems that it has been "out of box" in LLVM distribution already, probably you might need some work to fit them into your system.</div><div><br></div><div>I suggest you have a look at the <span class="Apple-style-span" style="font-family: Times; font-size: 16px; ">Kaleidoscope<span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "> example. It uses a trick to make standard functions, like abs / cot available to Kaleidoscope. You might implement your system in similar way.</span></span></div><div><br></div><div>-- Haohui</div><div><br><div><div>On Sep 8, 2008, at 3:13 PM, Tyler Wilson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div lang="EN-US" link="blue" vlink="purple"><div class="Section1"><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; ">Good day,<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; "><o:p> </o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; ">Firstly, I am very new to this project. I have dug through some of the documentation, but cannot find a satisfying answer to some questions I have. I hope somebody here can edify me.<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; "><o:p> </o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; ">I am interested in embedded a LLVM ‘VM’ inside an embedded ARM-based device. That is, I want to be able to load and execute .<span class="SpellE">bc</span><span class="Apple-converted-space"> </span>files directly in an embedded system.<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; "><o:p> </o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; ">The questions:<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; "><o:p> </o:p></span></font></div><div style="text-indent: -0.25in; margin-top: 0in; margin-right: 0in; margin-left: 0.5in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; "><span>-<font size="1" face="Times New Roman"><span style="font: normal normal normal 7pt/normal 'Times New Roman'; "> <span class="Apple-converted-space"> </span></span></font></span></span></font>Are there any more direct examples of doing the above?<o:p></o:p></div><div style="text-indent: -0.25in; margin-top: 0in; margin-right: 0in; margin-left: 0.5in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; "><span>-<font size="1" face="Times New Roman"><span style="font: normal normal normal 7pt/normal 'Times New Roman'; "> <span class="Apple-converted-space"> </span></span></font></span></span></font>I am unclear on how the .<span class="SpellE">bc</span><span class="Apple-converted-space"> </span>is ‘linked’ to the external functions it calls. For example, if I have a ‘print’ or ‘<span class="SpellE">playSound</span>’ function implemented in my firmware environment, and have properly exposed it to the LLVM front-end language, how does the connection and actual function call occur at run-time?<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; "><o:p> </o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; ">If I can get answers or pointers to answers, that should get me started.<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; "><o:p> </o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; ">Thank you,<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font size="2" face="Calibri"><span style="font-size: 11pt; ">Tyler<o:p></o:p></span></font></div></div>_______________________________________________<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" style="color: blue; text-decoration: underline; ">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" style="color: blue; text-decoration: underline; ">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></span></blockquote></div><br></div></body></html>