1 --- GlideV3/glide2x/h3/glide/src/fxglide.h.orig 2013-09-22 13:04:59.430129466 +0200
2 +++ GlideV3/glide2x/h3/glide/src/fxglide.h 2013-09-22 13:10:55.626683027 +0200
4 #define P6FENCE __eieio()
5 #elif defined(__GNUC__) && defined(__i386__)
6 #define P6FENCE asm("xchg %%eax, %0" : : "m" (_GlideRoot.p6Fencer) : "eax");
7 +#elif defined(__ia64__)
8 +#define P6FENCE asm volatile ("mf.a" ::: "memory");
9 +#elif defined(__alpha__)
10 +# define P6FENCE asm volatile("mb" ::: "memory");
11 +#elif defined(__powerpc__)
12 +# define P6FENCE asm volatile ("sync" ::: "memory");
13 +#elif defined (__x86_64__)
14 +# define P6FENCE asm volatile("mfence" ::: "memory");
15 +#elif defined(__sparc64__)
16 +# define P6FENCE asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory");
17 +#elif defined(__sparc__)
18 +# define P6FENCE asm volatile("" ::: "memory");
20 #error "P6 Fencing in-line assembler code needs to be added for this compiler"
21 #endif /* Compiler specific fence commands */
22 --- GlideV3/glide2x/h3/glide/src/makefile.linux.orig 2013-09-22 14:06:56.279556474 +0200
23 +++ GlideV3/glide2x/h3/glide/src/makefile.linux 2013-09-22 14:09:47.450846589 +0200
25 ifeq ($(FX_GLIDE_CTRISETUP),1)
27 ATSOPTS = -DGLIDE_USE_C_TRISETUP
29 +CFILES = gxdraw.c xtexdl_def.c
32 +ASMCPUDTECT = cpudtect.S
33 DSPOPTS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_PACKED_RGB=0
36 -ASMTRISETUP = xdraw2.S
37 +ASMTRISETUP = xdraw2.S cpudtect.S
39 LIBOBJS += xdraw2_def.o xdraw2_3dnow.o
42 LAINCS = -I$(BUILD_ROOT)/$(FX_GLIDE_HW)/include
43 LAOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS)
45 -AFILES = $(ASMTRISETUP) cpudtect.S
46 +AFILES = $(ASMTRISETUP) $(ASMCPUDTECT)
49 HEADERS = glide.h gump.h glidesys.h glideutl.h
50 --- GlideV3/glide2x/h3/glide/src/gpci.c.orig 2000-03-20 22:51:02.000000000 +0100
51 +++ GlideV3/glide2x/h3/glide/src/gpci.c 2013-09-22 16:43:44.783550030 +0200
54 /* Setup the basic proc tables based on the cpu type. */
56 - _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU", _cpu_detect_asm() );
57 + _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU",
64 GDBG_INFO(80,"\tcpu: %d\n",_GlideRoot.CPUType);
67 --- GlideV3/glide2x/h3/glide/src/diglide.c.orig 2000-03-20 22:51:02.000000000 +0100
68 +++ GlideV3/glide2x/h3/glide/src/diglide.c 2013-09-22 16:48:14.702762083 +0200
72 case GR_HINT_FPUPRECISION:
74 hints ? double_precision_asm() : single_precision_asm();
78 case GR_HINT_ALLOW_MIPMAP_DITHER:
79 --- GlideV3/glide3x/h3/glide3/src/fxglide.h.orig 2013-09-22 16:52:18.240748150 +0200
80 +++ GlideV3/glide3x/h3/glide3/src/fxglide.h 2013-09-22 16:53:06.216311355 +0200
81 @@ -1475,6 +1475,18 @@
82 # define P6FENCE __eieio()
83 #elif defined(__GNUC__) && defined(__i386__)
84 #define P6FENCE asm("xchg %%eax, %0" : : "m" (_GlideRoot.p6Fencer) : "eax");
85 +#elif defined(__ia64__)
86 +#define P6FENCE asm volatile ("mf.a" ::: "memory");
87 +#elif defined(__alpha__)
88 +# define P6FENCE asm volatile("mb" ::: "memory");
89 +#elif defined(__powerpc__)
90 +# define P6FENCE asm volatile ("sync" ::: "memory");
91 +#elif defined (__x86_64__)
92 +# define P6FENCE asm volatile("mfence" ::: "memory");
93 +#elif defined(__sparc64__)
94 +# define P6FENCE asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory");
95 +#elif defined(__sparc__)
96 +# define P6FENCE asm volatile("" ::: "memory");
97 #else /* !defined ( P6FENCE ) */
98 # error "P6 Fencing code needs to be added for this compiler"
99 #endif /* !defined ( P6FENCE ) */
100 --- GlideV3/glide3x/h3/glide3/src/makefile.linux.orig 2000-03-20 22:51:03.000000000 +0100
101 +++ GlideV3/glide3x/h3/glide3/src/makefile.linux 2013-09-22 16:59:00.126094039 +0200
102 @@ -128,10 +128,11 @@
103 # this makefile from Chris's sst1 glide2x tree.
104 ifeq ($(FX_GLIDE_CTRISETUP),1)
107 ATSOPTS = -DGLIDE_USE_C_TRISETUP
111 +ASMCPUDTECT = cpudtect.S
112 # There are now special build rules to get specialized
113 # function versions of the functions taht these files
114 # originally contained. See the end of the file.
116 LAINCS = -I$(BUILD_ROOT)/$(FX_GLIDE_HW)/include
117 LAOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS)
119 -AFILES = $(ASMTRISETUP) cpudtect.S
120 +AFILES = $(ASMTRISETUP) $(ASMCPUDTECT)
123 HEADERS = glide.h glidesys.h glideutl.h
124 --- GlideV3/glide3x/h3/glide3/src/gpci.c.orig 2000-03-20 22:51:03.000000000 +0100
125 +++ GlideV3/glide3x/h3/glide3/src/gpci.c 2013-09-22 17:02:02.101218508 +0200
127 _GlideRoot.environment.gammaG = GLIDE_FGETENV("SSTH3_GGAMMA", -1.f);
128 _GlideRoot.environment.gammaB = GLIDE_FGETENV("SSTH3_BGAMMA", -1.f);
130 - _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU", _cpu_detect_asm() );
131 + _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU",
138 GDBG_INFO(0," cpu: 0x%x\n",_GlideRoot.CPUType);
140 /* Setup the basic proc tables based on the cpu type. */