[llvm-commits] [RFC] PPC64 TOC and MCJIT support
Adhemerval Zanella
azanella at linux.vnet.ibm.com
Wed Aug 8 10:30:15 PDT 2012
On 08/06/2012 03:49 PM, Roman Divacky wrote:
> Wow, this looks awesome, some parts of this (adding of enums and handling them)
> can be committed as is. Maybe you can split them into logical chunks? Ie.
> "Handle ELF::PPC{64} in ELF" etc. The TOC handling changes look fine to me.
> The LDtoc* stuff too. I cant comment on the JIT part.
Ok, I'll finish some work on relocation before. I found out that for small toc
model, the one I'm targeting now, it need some adjustments. I will also split
up the patch in parts, maybe one for changes in 'include/llvm', another for
TOC relocation and another fro JIT support.
> Also, please send the patches as attachments, not inline.
Got it.
> the OutStreamer.hasRawTextSupport() is needed because we emit ".tc"
>
> would this be a right thing to do?
>
> - OutStreamer.EmitRawText("\t.tc " + Twine(I->first->getName()) +
> - "[TC]," + I->first->getName());
> + MCSymbol *S = OutContext.GetOrCreateSymbol(I->first->getName());
> + OutStreamer.EmitValue(MCSymbolRefExpr::Create(S, OutContext),
> + Subtarget.isPPC64() ? 8 : 4/*size*/, 0/*addrspace*/);
>
I added it for MCJIT support (without my change the .LC0_X emit constant
triggers an error of double creation). I might be wrong and please correct me
if I were, but since the stream class used for MCJIT does not support
raw text and it does not need .tc directives, I believe the my code is
fine.
--
Adhemerval Zanella Netto
Software Engineer
Linux Technology Center Brazil
Toolchain / GLIBC on Power Architecture
azanella at linux.vnet.ibm.com / azanella at br.ibm.com
+55 61 8642-9890
More information about the llvm-commits
mailing list