For shits and giggles, I replaced the lvx instruction in the Altivec check with '.long 0x00000000', which is guaranteed to be an illegal instruction on all powerpc processors. And then I ran gdb on one of the example programs:
----- wendolyne:~/liboil/liboil/examples$ libtool gdb -args ./oil-inspect copy_u8 *** Warning: inferring the mode of operation is deprecated. *** Future versions of Libtool will require --mode=MODE be specified. GNU gdb 6.3.90_20051119-debian Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) r Starting program: /home/ds/liboil/liboil/examples/.libs/lt-oil-inspect copy_u8 Program received signal SIGILL, Illegal instruction. 0x0ff9dce8 in test_altivec (ignored=0x0) at liboilcpu.c:288 288 asm volatile ( (gdb) c Continuing. OIL: ERROR liboiltest.c 403: oil_test_check_impl(): function conv_f32_s16_bitstuff in class conv_f32_s16 failed check (43.6562 > 0.1) || (outside=0) copy_u8 (uint8_t *dest, uint8_t *src, int n) all implementations: copy_u8_motovec sum abs difference: 0 (n=0) disabled copy_u8_altivec2 sum abs difference: 0 (n=0) disabled copy_u8_altivec sum abs difference: 0 (n=0) disabled copy_u8_llints profile: 5.88889 ticks (std.dev. 1.13116) sum abs difference: 0 (n=100) currently chosen copy_u8_ints profile: 6.88889 ticks (std.dev. 1.13116) sum abs difference: 0 (n=100) copy_u8_llints_duff profile: 7.55556 ticks (std.dev. 1.14033) sum abs difference: 0 (n=100) copy_u8_libc profile: 9.1 ticks (std.dev. 1.1701) sum abs difference: 0 (n=100) copy_u8_ref flags: REF profile: 14.4 ticks (std.dev. 1.12437) copy_u8_ptr profile: 21 ticks (std.dev. 1.125) sum abs difference: 0 (n=100) Program exited normally. (gdb) ----- Note that the altivec implementations are listed as 'disabled', because the Altivec check failed. After reinstating the lvx instruction in the test, I added the same illegal instruction to one of the copy_u8 implementations, copy_u8_altivec: ----- wendolyne:~/liboil/liboil/examples$ ./oil-inspect copy_u8 OIL: ERROR liboiltest.c 403: oil_test_check_impl(): function conv_f32_s16_bitstuff in class conv_f32_s16 failed check (44.6484 > 0.1) || (outside=0) OIL: ERROR liboiltest.c 359: oil_test_check_impl(): illegal instruction in copy_u8_altivec copy_u8 (uint8_t *dest, uint8_t *src, int n) all implementations: copy_u8_altivec sum abs difference: 0 (n=0) copy_u8_llints profile: 5.88889 ticks (std.dev. 1.13116) sum abs difference: 0 (n=100) currently chosen copy_u8_motovec profile: 6.22222 ticks (std.dev. 1.13575) sum abs difference: 0 (n=100) copy_u8_ints profile: 7 ticks (std.dev. 1.125) sum abs difference: 0 (n=100) copy_u8_llints_duff profile: 7.44444 ticks (std.dev. 1.14033) sum abs difference: 0 (n=100) copy_u8_libc profile: 8.8 ticks (std.dev. 1.13093) sum abs difference: 0 (n=100) copy_u8_altivec2 profile: 10 ticks (std.dev. 1.125) sum abs difference: 0 (n=100) copy_u8_ref flags: REF profile: 14.7 ticks (std.dev. 1.12272) copy_u8_ptr profile: 20.7778 ticks (std.dev. 1.13575) sum abs difference: 0 (n=100) wendolyne:~/liboil/liboil/examples$ ----- Notice that liboil caught the illegal instruction in copy_u8_altivec and disabled it automatically. It also noticed a problem in conv_f32_s16_bitstuff, which I should probably fix. Those lines are actually just warnings, since the performance of liboil is unchanged, but I prefer the word "ERROR" because it causes people to report it as a bug, which means it's more likely to get fixed. By the way, I also have a G3 Mac right next to me that runs liboil fine. I would have run the tests on that, but its gdb is broken. dave... -- David Schleef Big Kitten LLC (http://www.bigkitten.com/) -- data acquisition on Linux -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]