Hi, I'm having problem with generating ppc64-assembler code. First I create ppc64-assembler with llc: llc -march=ppc64 gzip.bc -f -o gzip.s Then I try to compile this with a cross-compiler on x86_64-linux to ppc64-linux: .../crosstools/gcc-4.2.4-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-gcc gzip.s But the compiler gives me gzip.4.s: Assembler messages: gzip.4.s:2007: Error: value of 326712 too large for field of 2 bytes at 6994 ... The line 2007 looks like: ... ld 6, block_start at l(6) ... Where the symbol block_start is defined at the end of gzip.s as ... .section .bss,"aw", at nobits ... .lcomm block_start,8 # 'block_start' ... Is there something wrong with my cross-compiler or is the llc-generated code bad? Thanks, Andi
On Wed, Jun 10, 2009 at 3:03 PM, Andreas Neustifter<e0325716 at student.tuwien.ac.at> wrote:> Is there something wrong with my cross-compiler or is the llc-generated code bad?Most likely the latter, the powerpc64-unknown-linux-gnu target is not officially supported by LLVM. In fact there is no support for the 64-bit PowerPC Linux ABI in the PPC backend at all. The generated assembly is probably some Darwin-centric 64-bit code. As part of Google Summer of Code 2009 I'm currently working on making powerpc-unknown-linux-gnu an officially supported target, it is still in early stages though. Greetings, Tilmann
Hi, Tilmann Scheller wrote:> On Wed, Jun 10, 2009 at 3:03 PM, Andreas > Neustifter<e0325716 at student.tuwien.ac.at> wrote: >> Is there something wrong with my cross-compiler or is the llc-generated code bad? > Most likely the latter, the powerpc64-unknown-linux-gnu target is not > officially supported by LLVM. In fact there is no support for the > 64-bit PowerPC Linux ABI in the PPC backend at all. The generated > assembly is probably some Darwin-centric 64-bit code. > > As part of Google Summer of Code 2009 I'm currently working on making > powerpc-unknown-linux-gnu an officially supported target, it is still > in early stages though.Just to be sure: since you are working on powerpc-unknown-linux-gnu (which is the triple used for the 32-bit portion of ppc) am I correct in assuming that the 32 bit part also does not work? Thanks for the hint, Andi