<div dir="ltr">Hi Matthew,<div><br></div><div>The byte==8 bits is more of a Clang issue rather than an LLVM issue. I believe your bigger issue will be the fact that you would need to make i24's a legal type in your backend, which as far as I know (unless something has changed recently), is a _big_ job. I briefly looked into it at one point, and decided to leave it for another day.</div><div><br></div><div>I am also unsure how hard byte=8bits is backed into Clang. You might want to ask cfe-dev.</div><div><br></div><div>I hope that helps.</div><div><br></div><div>Johnny</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 9, 2014 at 7:41 AM, Matthew Gardiner <span dir="ltr"><<a href="mailto:mg11@csr.com" target="_blank">mg11@csr.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
We have some DSP architectures (kalimba) which have 24-bits as their<br>
"minimum addressable unit". So this means that the sizeof a char (and<br>
an int and a short for that matter) is 24-bits.<br>
<br>
I quickly read the posted link WritingAnLLVMBackend.html but did not<br>
see an obvious answer to the following question:<br>
<br>
Is it possible to write a backend that faithfully represents these<br>
architectures or is sizeof_byte==8 bits baked into to llvm?<br>
<br>
Does anyone have any views on the above?<br>
<br>
thanks<br>
Matthew Gardiner<br>
<div><div class="h5"><br>
<br>
On Tue, 9 Sep 2014 18:21:01 +1200<br>
Bruce Hoult <<a href="mailto:bruce@hoult.org">bruce@hoult.org</a>> wrote:<br>
<br>
> <a href="http://llvm.org/docs/WritingAnLLVMBackend.html" target="_blank">http://llvm.org/docs/WritingAnLLVMBackend.html</a><br>
><br>
><br>
> On Tue, Sep 9, 2014 at 6:09 PM, Prakash Premkumar<br>
> <<a href="mailto:prakash.prax@gmail.com">prakash.prax@gmail.com</a>> wrote:<br>
><br>
> > How does LLVM generate machine code for different architectures?<br>
> > For example, the machine code for x86 and amd will vary.<br>
> ><br>
> > How does LLVM convert its IR to machine code for different<br>
> > architectures.Can you please explain the approach? Is it just write<br>
> > two different programs for two different architectures and pass a<br>
> > flag to the compiler based on which machine code you want to<br>
> > generate?<br>
> ><br>
> > Thanks a lot for your explanations.<br>
> ><br>
> > Thanks<br>
> > Prakash<br>
> ><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>
> ><br>
><br>
><br>
</div></div>>  To report this email as spam click<br>
> <a href="https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ==" target="_blank">https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ==</a> .<br>
<br>
<br>
<br>
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom<br>
More information can be found at <a href="http://www.csr.com" target="_blank">www.csr.com</a>. Keep up to date with CSR on our technical blog, <a href="http://www.csr.com/blog" target="_blank">www.csr.com/blog</a>, CSR people blog, <a href="http://www.csr.com/people" target="_blank">www.csr.com/people</a>, YouTube, <a href="http://www.youtube.com/user/CSRplc" target="_blank">www.youtube.com/user/CSRplc</a>, Facebook, <a href="http://www.facebook.com/pages/CSR/191038434253534" target="_blank">www.facebook.com/pages/CSR/191038434253534</a>, or follow us on Twitter at <a href="http://www.twitter.com/CSR_plc" target="_blank">www.twitter.com/CSR_plc</a>.<br>
New for 2014, you can now access the wide range of products powered by aptX at <a href="http://www.aptx.com" target="_blank">www.aptx.com</a>.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>