[Liboil] PPC 970 (64 bit support)?

Matthew Clark tranzmatt at yahoo.com
Tue Oct 30 14:05:28 PDT 2007


I'm trying to compile the liboil package so I can compare the performace of a 32-bit PPC 7447A vs a 64-bit PPC 970, including the Altivec.   The code compiled fine on the 7447A machine (running gcc 3.4.4 on a linux 2.6.14, libc 2.3.6), but I got compile errors on my 970 (2.6.21, gcc 4.1.2, libc 2.3.6)

 gcc -DHAVE_CONFIG_H -I. -I. -I.. -Wall -D_BSD_SOURCE 
-D_GNU_SOURCE -I.. -g -O2 -MT liboil_0.3_la-liboilcpu.lo -MD -MP 
-MF .deps/liboil_0.3_la-liboilcpu.Tpo -c liboilcpu.c  -fPIC -DPIC -o .libs/liboil_0.3_la-liboilcpu.o
/tmp/cch1g9kK.s: Assembler messages:
/tmp/cch1g9kK.s:94: Error: unsupported relocation against v0
/tmp/cch1g9kK.s:94: Error: unsupported relocation against v0
/tmp/cch1g9kK.s:94: Error: unsupported relocation against v0

The offending code seems to be:

asm volatile ("vor v0, v0, v0\n");

So I checked asm/ppc_asm.h and didn't see v0, but saw vr0 for the altivec.  I hacked the code to add/change "v" register references to "vr".  But now it's balking on:

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -Wall -D_BSD_SOURCE 
-D_GNU_SOURCE -I../.. -g -O2 -MT libdeprecated_la-vectoradd_f64.lo 
-MD -MP -MF .deps/libdeprecated_la-vectoradd_f64.Tpo -c vectoradd_f64.c  
-fPIC -DPIC -o .libs/libdeprecated_la-vectoradd_f64.o

vectoradd_f64.c:76: error: expected ';', ',' or ')' before numeric constant
vectoradd_f64.c:76: error: 'vectoradd_s8_ref' undeclared here (not in a function)
vectoradd_f64.c:97: error: expected ';', ',' or ')' before numeric constant
vectoradd_f64.c:97: error: 'vectoradd_u8_ref' undeclared here (not in a function)
vectoradd_f64.c:118: error: expected ';', ',' or ')' before numeric constant
vectoradd_f64.c:118: error: 'vectoradd_s16_ref' undeclared here (not in a function)
vectoradd_f64.c:139: error: expected ';', ',' or ')' before numeric constant
vectoradd_f64.c:139: error: 'vectoradd_u16_ref' undeclared here (not in a function)
vectoradd_f64.c:160: error: expected ';', ',' or ')' before numeric constant
vectoradd_f64.c:160: error: 'vectoradd_s32_ref' undeclared here (not in a function)
vectoradd_f64.c:181: error: expected ';', ',' or ')' before numeric constant
vectoradd_f64.c:181: error: 'vectoradd_u32_ref' undeclared here (not in a function)
vectoradd_f64.c:202: error: expected ';', ',' or ')' before numeric constant
vectoradd_f64.c:202: error: 'vectoradd_f32_ref' undeclared here (not in a function)
vectoradd_f64.c:223: error: expected ';', ',' or ')' before numeric constant
vectoradd_f64.c:223: error: 'vectoradd_f64_ref' undeclared here (not in a function)

Can anyone help me get this working, or is this a futile effort?

Thanks,

Matt

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/liboil/attachments/20071030/6fcf0b2d/attachment.html 


More information about the Liboil mailing list