1 --- glide3x-20010309/h3/glide3/src/gpci.c.orig 2004-01-17 17:28:19.000000000 +0000
2 +++ glide3x-20010309/h3/glide3/src/gpci.c 2004-01-17 18:51:34.000000000 +0000
4 _GlideRoot.environment.gammaG = GLIDE_FGETENV("SSTH3_GGAMMA", -1.f);
5 _GlideRoot.environment.gammaB = GLIDE_FGETENV("SSTH3_BGAMMA", -1.f);
7 - _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU", _cpu_detect_asm() );
8 + _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU",
15 GDBG_INFO(0," cpu: 0x%x\n",_GlideRoot.CPUType);
17 /* Setup the basic proc tables based on the cpu type. */
18 --- glide3x-20010309/h3/glide3/src/fxglide.h.orig 2004-01-17 17:28:19.000000000 +0000
19 +++ glide3x-20010309/h3/glide3/src/fxglide.h 2004-01-17 18:33:30.000000000 +0000
20 @@ -1494,6 +1494,14 @@
21 # define P6FENCE asm volatile ("mf.a" ::: "memory");
22 #elif defined(__alpha__)
23 # define P6FENCE asm volatile("mb" ::: "memory");
24 +#elif defined(__powerpc__)
25 +# define P6FENCE asm volatile ("sync" ::: "memory");
26 +#elif defined (__x86_64__)
27 +# define P6FENCE asm volatile("mfence" ::: "memory");
28 +#elif defined(__sparc64__)
29 +# define P6FENCE asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory");
30 +#elif defined(__sparc__)
31 +# define P6FENCE asm volatile("" ::: "memory");
32 #else /* !defined ( P6FENCE ) */
33 # error "P6 Fencing code needs to be added for this compiler"
34 #endif /* !defined ( P6FENCE ) */
35 --- glide3x-20010309/h3/glide3/src/cpudtect.S.orig 2004-01-17 17:28:19.000000000 +0000
36 +++ glide3x-20010309/h3/glide3/src/cpudtect.S 2004-01-17 18:49:43.000000000 +0000
41 -#else /* !__ia64__ */
42 +#elif defined(__i386__) /* !__ia64__ */
46 --- glide3x-20010309/h3/minihwc/linhwc.c.dri.orig 2004-01-17 17:28:19.000000000 +0000
47 +++ glide3x-20010309/h3/minihwc/linhwc.c.dri 2004-01-17 18:32:57.000000000 +0000
49 # define P6FENCE asm volatile("mf.a" ::: "memory");
50 #elif defined(__alpha__)
51 # define P6FENCE asm volatile("mb" ::: "memory");
52 +#elif defined(__powerpc__)
53 +# define P6FENCE asm volatile ("sync" ::: "memory");
54 +#elif defined (__x86_64__)
55 +# define P6FENCE asm volatile("mfence" ::: "memory");
56 +#elif defined(__sparc64__)
57 +# define P6FENCE asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory");
58 +#elif defined(__sparc__)
59 +# define P6FENCE asm volatile("" ::: "memory");
61 # define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
63 --- glide3x-20010309/h3/minihwc/linhwc.c.save.orig 2004-01-17 17:28:19.000000000 +0000
64 +++ glide3x-20010309/h3/minihwc/linhwc.c.save 2004-01-17 18:33:13.000000000 +0000
66 # define P6FENCE asm volatile ("mf.a" ::: "memory");
67 #elif defined(__alpha__)
68 # define P6FENCE asm volatile("mb" ::: "memory");
69 +#elif defined(__powerpc__)
70 +# define P6FENCE asm volatile ("sync" ::: "memory");
71 +#elif defined (__x86_64__)
72 +# define P6FENCE asm volatile("mfence" ::: "memory");
73 +#elif defined(__sparc64__)
74 +# define P6FENCE asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory");
75 +#elif defined(__sparc__)
76 +# define P6FENCE asm volatile("" ::: "memory");
78 # define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
80 --- glide3x-20010309/h5/glide3/src/fxglide.h.orig 2004-01-17 17:28:19.000000000 +0000
81 +++ glide3x-20010309/h5/glide3/src/fxglide.h 2004-01-17 18:31:36.000000000 +0000
82 @@ -2100,6 +2100,14 @@
83 # define P6FENCE asm volatile ("mf.a" ::: "memory");
84 #elif defined(__alpha__)
85 # define P6FENCE asm volatile("mb" ::: "memory");
86 +#elif defined(__powerpc__)
87 +# define P6FENCE asm volatile ("sync" ::: "memory");
88 +#elif defined(__x86_64__)
89 +# define P6FENCE asm volatile ("mfence" ::: "memory");
90 +#elif defined(__sparc64__)
91 +# define P6FENCE asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory");
92 +#elif defined(__sparc__)
93 +# define P6FENCE asm volatile("" ::: "memory");
94 #else /* !defined ( P6FENCE ) */
95 # error "P6 Fencing code needs to be added for this compiler"
96 #endif /* !defined ( P6FENCE ) */
97 --- glide3x-20010309/h5/glide3/src/cpudtect.s.orig 2004-01-17 17:28:19.000000000 +0000
98 +++ glide3x-20010309/h5/glide3/src/cpudtect.s 2004-01-17 18:46:25.000000000 +0000
103 -#else /* !__ia64__ */
104 +#elif defined(__i386__) /* !__ia64__ */
108 --- glide3x-20010309/h5/glide3/src/gpci.c.orig 2004-01-17 17:28:19.000000000 +0000
109 +++ glide3x-20010309/h5/glide3/src/gpci.c 2004-01-17 18:48:53.000000000 +0000
110 @@ -1571,7 +1571,13 @@
112 _GlideRoot.environment.useAppGamma = GLIDE_GETENV("FX_GLIDE_USE_APP_GAMMA", 1L);
114 - _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU", _cpu_detect_asm() );
115 + _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU",
122 GDBG_INFO(0," cpu: 0x%x\n",_GlideRoot.CPUType);
124 /* Setup the basic proc tables based on the cpu type. */
125 --- glide3x-20010309/h5/minihwc/linhwc.c.orig 2004-01-17 17:28:19.000000000 +0000
126 +++ glide3x-20010309/h5/minihwc/linhwc.c 2004-01-17 18:29:36.000000000 +0000
128 # define P6FENCE asm volatile("mf.a" ::: "memory");
129 #elif defined (__alpha__)
130 # define P6FENCE asm volatile("mb" ::: "memory");
131 +#elif defined (__powerpc__)
132 +# define P6FENCE asm volatile("sync" ::: "memory");
133 +#elif defined (__x86_64__)
134 +# define P6FENCE asm volatile("mfence" ::: "memory");
135 +#elif defined(__sparc64__)
136 +# define P6FENCE asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory");
137 +#elif defined(__sparc__)
138 +# define P6FENCE asm volatile("" ::: "memory");
140 # define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
142 --- glide3x-20010309/swlibs/newpci/pcilib/fxlinux.c.orig 2004-01-17 17:28:19.000000000 +0000
143 +++ glide3x-20010309/swlibs/newpci/pcilib/fxlinux.c 2004-01-17 17:44:36.000000000 +0000
145 #include <sys/stat.h>
146 #include <sys/mman.h>
147 #include <sys/ioctl.h>
148 +#if defined(__powerpc__) || defined(__sparc__)
149 +#define iopl(X) (-1)