annotate libdha/test.c @ 11007:48b7d7aa444d

configure altivec patch by Magnus Damm <damm@opensource.se> * CC is not checked for Altivec support (see above). The patch adds checks for FSF-style flags and Darwin-style flags. The check is performed regardless of the gcc version. * Disabling of Altivec. --disable-altivec is broken today if /proc/cpuinfo shows that your cpu supports altivec. The patch takes care of that. * "GCC & CPU optimization abilities" always show that it is optimizing for the cpu configure is running on, it should show the optimization that is enabled for gcc instead. Cosmetic change only, but confusing as it is today IMHO. * Runtime CPU-detection now enables altivec for powerpc. Now with the patch it should be possible to use --enable-altivec, --disable-altivec, --enable-runtime-cpudetection regardless of powerpc cpu type. The configure script handles altivec support in the following order: 1. Altivec is enabled by default if your cpu supports it. 2. --enable-runtime-cpudetection will enable altivec support. 3. If you have forced altivec on/off with --enable-altivec/--disable-altivec, then your selection will override the previous altivec configuration. 4. If altivec is enabled but the compiler doesn't support it, altivec gets turned off.
author attila
date Sat, 04 Oct 2003 23:06:04 +0000
parents f6d2772efca3
children 972d1998bde9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
1 #include "libdha.h"
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
2 #include <stdio.h>
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
3 #include <string.h>
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
4 #include <stdlib.h>
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
5
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
6 int main( void )
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
7 {
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
8 pciinfo_t lst[MAX_PCI_DEVICES];
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
9 unsigned i,num_pci;
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
10 int err;
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
11 err = pci_scan(lst,&num_pci);
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
12 if(err)
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
13 {
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
14 printf("Error occured during pci scan: %s\n",strerror(err));
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
15 return EXIT_FAILURE;
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
16 }
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
17 else
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
18 {
9767
f6d2772efca3 Ignore disabled cards. (Jon Burgess <jburgess@uklinux.net>)
ranma
parents: 3973
diff changeset
19 printf(" Bus:card:func vend:dev command base0 :base1 :base2 :baserom\n");
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
20 for(i=0;i<num_pci;i++)
9767
f6d2772efca3 Ignore disabled cards. (Jon Burgess <jburgess@uklinux.net>)
ranma
parents: 3973
diff changeset
21 printf("%04X:%04X:%04X %04X:%04X %04X %08X:%08X:%08X:%08X\n"
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
22 ,lst[i].bus,lst[i].card,lst[i].func
9767
f6d2772efca3 Ignore disabled cards. (Jon Burgess <jburgess@uklinux.net>)
ranma
parents: 3973
diff changeset
23 ,lst[i].vendor,lst[i].device,lst[i].command
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
24 ,lst[i].base0,lst[i].base1,lst[i].base2,lst[i].baserom);
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
25 }
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
26 return EXIT_SUCCESS;
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
27 }