hi, I am porting llvm to our embedded cpu. By my abi, long long type is aligned by 8 bytes. But now llvm-gcc frontend follows x86 abi, generate word-alignment LLVM-IR for va_arg(). In some degree, llvm-gcc frontend depends on targets. The best solution is llvm-gcc can create va_arg node, I can lower it at the backend. Who can give a temporary solution to make frontend can create 8 byte alignment code for long long type? Thanks renkun. ___________________________________________________________ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090104/45a0386c/attachment.html>
Evan Cheng
2009-Jan-05 08:14 UTC
[LLVMdev] hi, llvm-gcc deal with va_arg() by word alignment.
Is your llvm-gcc frontend targeting x86? It does not generate target neutral bitcode. Evan On Jan 4, 2009, at 3:11 AM, 任坤 wrote:> hi, > I am porting llvm to our embedded cpu. > By my abi, long long type is aligned by 8 bytes. > But now llvm-gcc frontend follows x86 abi, generate > word-alignment LLVM-IR for va_arg(). > > In some degree, llvm-gcc frontend depends on targets. > The best solution is llvm-gcc can create va_arg node, > I can lower it at the backend. > > Who can give a temporary solution to make frontend can > create 8 byte alignment code for long long type? > > Thanks > > renkun. > > 好玩贺卡等你发,邮箱贺卡全新上线! > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090105/4482352b/attachment.html>
Duncan Sands
2009-Jan-05 10:37 UTC
[LLVMdev] hi, llvm-gcc deal with va_arg() by word alignment.
Hi,> I am porting llvm to our embedded cpu. > By my abi, long long type is aligned by 8 bytes. > But now llvm-gcc frontend follows x86 abi, generate > word-alignment LLVM-IR for va_arg().if llvm-gcc thinks the alignment is 4 but it is not then you will get more problems than just with va_arg. Why not teach llvm-gcc about your target? Ciao, Duncan.
Seemingly Similar Threads
- [LLVMdev] Find all backedges of CFG by MachineDominatorTree. please look at my jpg.
- [LLVMdev] hi, Hi, (Preccessors' Number) < MachineBasicBlock's Number < (Successors's Number), Is it really?
- [LLVMdev] 转发: Re: Dear Evan Chang, Re: help: about how to use tblgen to constraint operand.
- [LLVMdev] help: about how to use tblgen to constraint operand.
- [LLVMdev] Dear Evan Chang, Re: help: about how to use tblgen to constraint operand.