<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 20, 2013 at 6:14 AM, Boris Boesler <span dir="ltr"><<a href="mailto:baembel@gmx.de" target="_blank">baembel@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


Hi!<br>
<br>
 I want to write a LLVM back-end for a bit addressing target architecture.<br>
<a href="http://llvm.org/docs/GetElementPtr.html#i-m-writing-a-backend-for-a-target-which-needs-custom-lowering-for-gep-how-do-i-do-this" target="_blank">http://llvm.org/docs/GetElementPtr.html#i-m-writing-a-backend-for-a-target-which-needs-custom-lowering-for-gep-how-do-i-do-this</a> states quite clearly that some additional work must be done for this sort of architecture. Is this still true? Is there a project/branch to make it more flexible? Support for any memory addressing?<br>



<br>
 I had a short look at SelectionDAGBuilder::visitGetElementPtr(const User &I) and either this method handles it properly already or customization with some target attributes should not be difficult.<br></blockquote><div>


<br></div><div>Yes, you're right.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
 And what means "a lot of code in the backend" in the link above? Which other parts are involved?<br>
<br><br></blockquote><div><br></div><div>The tricky part here isn't addressing, it's that is that each address points at 32 bits, so you have to track down every single place LLVM hardcodes "i8" and fix it.<br>

<br></div><div>CC'ing Philipp Brüschweiler, who had a patch series a while back (see <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120702/146050.html">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120702/146050.html</a>). 
    </div><div><br></div><div>-Eli<br></div></div><br></div></div>