]>
Commit | Line | Data |
---|---|---|
d1fb270e JB |
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 | |
3 | @@ -1329,6 +1329,18 @@ | |
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"); | |
19 | #else | |
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 | |
24 | @@ -129,12 +129,12 @@ | |
25 | ifeq ($(FX_GLIDE_CTRISETUP),1) | |
26 | ASMTRISETUP = | |
27 | ATSOPTS = -DGLIDE_USE_C_TRISETUP | |
28 | -CFILES = gxdraw.c | |
29 | +CFILES = gxdraw.c xtexdl_def.c | |
30 | else | |
31 | DSPOPTS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_PACKED_RGB=0 | |
32 | ||
33 | ifeq ($(GL_AMD3D),) | |
34 | -ASMTRISETUP = xdraw2.S | |
35 | +ASMTRISETUP = xdraw2.S cpudtect.S | |
36 | else | |
37 | LIBOBJS += xdraw2_def.o xdraw2_3dnow.o | |
38 | endif #GL_AMD3D | |
39 | @@ -185,7 +185,7 @@ | |
40 | LAINCS = -I$(BUILD_ROOT)/$(FX_GLIDE_HW)/include | |
41 | LAOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS) | |
42 | ||
43 | -AFILES = $(ASMTRISETUP) cpudtect.S | |
44 | +AFILES = $(ASMTRISETUP) | |
45 | ||
46 | # sources | |
47 | HEADERS = glide.h gump.h glidesys.h glideutl.h | |
48 | --- GlideV3/glide2x/h3/glide/src/gpci.c.orig 2000-03-20 22:51:02.000000000 +0100 | |
49 | +++ GlideV3/glide2x/h3/glide/src/gpci.c 2013-09-22 16:43:44.783550030 +0200 | |
50 | @@ -966,7 +966,13 @@ | |
51 | ||
52 | /* Setup the basic proc tables based on the cpu type. */ | |
53 | { | |
54 | - _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU", _cpu_detect_asm() ); | |
55 | + _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU", | |
56 | +#ifdef __i386__ | |
57 | + _cpu_detect_asm() | |
58 | +#else | |
59 | + 0 | |
60 | +#endif | |
61 | + ); | |
62 | GDBG_INFO(80,"\tcpu: %d\n",_GlideRoot.CPUType); | |
63 | ||
64 | /* Default case */ | |
65 | --- GlideV3/glide2x/h3/glide/src/diglide.c.orig 2000-03-20 22:51:02.000000000 +0100 | |
66 | +++ GlideV3/glide2x/h3/glide/src/diglide.c 2013-09-22 16:48:14.702762083 +0200 | |
67 | @@ -291,7 +291,9 @@ | |
68 | break; | |
69 | ||
70 | case GR_HINT_FPUPRECISION: | |
71 | +#ifdef __i386__ | |
72 | hints ? double_precision_asm() : single_precision_asm(); | |
73 | +#endif | |
74 | break; | |
75 | ||
76 | case GR_HINT_ALLOW_MIPMAP_DITHER: | |
77 | --- GlideV3/glide3x/h3/glide3/src/fxglide.h.orig 2013-09-22 16:52:18.240748150 +0200 | |
78 | +++ GlideV3/glide3x/h3/glide3/src/fxglide.h 2013-09-22 16:53:06.216311355 +0200 | |
79 | @@ -1475,6 +1475,18 @@ | |
80 | # define P6FENCE __eieio() | |
81 | #elif defined(__GNUC__) && defined(__i386__) | |
82 | #define P6FENCE asm("xchg %%eax, %0" : : "m" (_GlideRoot.p6Fencer) : "eax"); | |
83 | +#elif defined(__ia64__) | |
84 | +#define P6FENCE asm volatile ("mf.a" ::: "memory"); | |
85 | +#elif defined(__alpha__) | |
86 | +# define P6FENCE asm volatile("mb" ::: "memory"); | |
87 | +#elif defined(__powerpc__) | |
88 | +# define P6FENCE asm volatile ("sync" ::: "memory"); | |
89 | +#elif defined (__x86_64__) | |
90 | +# define P6FENCE asm volatile("mfence" ::: "memory"); | |
91 | +#elif defined(__sparc64__) | |
92 | +# define P6FENCE asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory"); | |
93 | +#elif defined(__sparc__) | |
94 | +# define P6FENCE asm volatile("" ::: "memory"); | |
95 | #else /* !defined ( P6FENCE ) */ | |
96 | # error "P6 Fencing code needs to be added for this compiler" | |
97 | #endif /* !defined ( P6FENCE ) */ | |
98 | --- GlideV3/glide3x/h3/glide3/src/makefile.linux.orig 2000-03-20 22:51:03.000000000 +0100 | |
99 | +++ GlideV3/glide3x/h3/glide3/src/makefile.linux 2013-09-22 16:59:00.126094039 +0200 | |
100 | @@ -128,10 +128,11 @@ | |
101 | # this makefile from Chris's sst1 glide2x tree. | |
102 | ifeq ($(FX_GLIDE_CTRISETUP),1) | |
103 | ASMTRISETUP = | |
104 | +ASMCPUDTECT = | |
105 | ATSOPTS = -DGLIDE_USE_C_TRISETUP | |
106 | CFILES += gxdraw.c | |
107 | else | |
108 | - | |
109 | +ASMCPUDTECT = cpudtect.S | |
110 | # There are now special build rules to get specialized | |
111 | # function versions of the functions taht these files | |
112 | # originally contained. See the end of the file. | |
113 | @@ -179,7 +180,7 @@ | |
114 | LAINCS = -I$(BUILD_ROOT)/$(FX_GLIDE_HW)/include | |
115 | LAOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS) | |
116 | ||
117 | -AFILES = $(ASMTRISETUP) cpudtect.S | |
118 | +AFILES = $(ASMTRISETUP) $(ASMCPUDTECT) | |
119 | ||
120 | # sources | |
121 | HEADERS = glide.h glidesys.h glideutl.h | |
122 | --- GlideV3/glide3x/h3/glide3/src/gpci.c.orig 2000-03-20 22:51:03.000000000 +0100 | |
123 | +++ GlideV3/glide3x/h3/glide3/src/gpci.c 2013-09-22 17:02:02.101218508 +0200 | |
124 | @@ -898,7 +898,13 @@ | |
125 | _GlideRoot.environment.gammaG = GLIDE_FGETENV("SSTH3_GGAMMA", -1.f); | |
126 | _GlideRoot.environment.gammaB = GLIDE_FGETENV("SSTH3_BGAMMA", -1.f); | |
127 | ||
128 | - _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU", _cpu_detect_asm() ); | |
129 | + _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU", | |
130 | +#ifdef __i386__ | |
131 | + _cpu_detect_asm() | |
132 | +#else | |
133 | + 0 | |
134 | +#endif | |
135 | + ); | |
136 | GDBG_INFO(0," cpu: 0x%x\n",_GlideRoot.CPUType); | |
137 | ||
138 | /* Setup the basic proc tables based on the cpu type. */ |