<html><head><base href="x-msg://10/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Unlike llvm itself, llvm-gcc needs to be configured for a particular target architecture. It looks like you're using a copy of llvm-gcc that was built to generate x86 code.<div><br><div><div>On Sep 30, 2009, at 6:27 AM, Jin Gu Kang wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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: 0px; "><div ocsi="x"><div dir="ltr"><font face="Tahoma" color="#000000" size="2">Dear LLVM members.</font></div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2">I am compiling coreutils-7.4 package for ARM linux using LLVM 2.5 version.</font></div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2">When i compiled 'od' program in coreutils package using LLVM 2.5,</font></div><div dir="ltr"><font face="tahoma" size="2">i could see the error message on llc processing.</font></div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr">> llvm-gcc -emit-llvm ./od.c -c -o ./od.bc <span class="Apple-converted-space"> </span><em>-other-options...</em></div><div dir="ltr">> llc -march=arm ./od.bc -f -o ./od.s<br>llc: /home/jaykang10/HardDisk2/Projects/LLVM/src/llvm-2.5/lib/Target/TargetData.cpp:305: unsigned int llvm::TargetData::getAlignmentInfo(llvm::AlignTypeEnum, uint32_t, bool, const llvm::Type*) const: Assertion `AlignType == VECTOR_ALIGN && "Unknown alignment type!"' failed.</div><div dir="ltr"> </div><div dir="ltr"><font face="Tahoma" size="2">The problem was that</font></div><div dir="ltr"><font face="Tahoma" size="2"><font face="tahoma">when i converted 'od' source code to llvm bitcode,<span class="Apple-converted-space"> </span></font>long double type of 'od' source code was changed to x86_fp80 type in llvm bitcode and then llc on ARM target was not support x86_fp80 type. </font></div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2">I think that long double type on ARM is 8 byte. (same as double type)</font></div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2">When we use llvm on ARM target,(or other target not support x86_fp80)</font></div><div dir="ltr"><font size="2"><font face="tahoma">i think it might be better to</font><font face="tahoma"> convert long double type in C to double type in llvm bitcode on llvm-gcc or</font></font></div><div dir="ltr"><font face="tahoma" size="2">treat x86_fp80 type in llvm bitcode as double type on llc.</font></div><div dir="ltr"><font face="tahoma" size="2">(I wonder if we select the target at llvm-gcc build time)</font></div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2">I would like to know how to solve the above problem.</font></div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2">Thank you</font></div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2">Best regards,</font></div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2">Jin-Gu Kang</font></div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="tahoma" size="2"></font> </div><div dir="ltr"><font face="Tahoma"></font> </div><div dir="ltr"><font face="times new roman"></font> </div>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a><span class="Apple-converted-space"> </span> <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></span></blockquote></div><br></div></body></html>