]> git.pld-linux.org Git - packages/Glide_V3.git/blame - glide-morearchs.patch
- release 19 (by relup.sh)
[packages/Glide_V3.git] / glide-morearchs.patch
CommitLineData
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
5bc2a1ab 24@@ -129,12 +129,14 @@
d1fb270e
JB
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
5bc2a1ab 30+ASMCPUDTECT =
d1fb270e 31 else
5bc2a1ab 32+ASMCPUDTECT = cpudtect.S
d1fb270e
JB
33 DSPOPTS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_PACKED_RGB=0
34
35 ifeq ($(GL_AMD3D),)
36-ASMTRISETUP = xdraw2.S
37+ASMTRISETUP = xdraw2.S cpudtect.S
38 else
39 LIBOBJS += xdraw2_def.o xdraw2_3dnow.o
40 endif #GL_AMD3D
41@@ -185,7 +185,7 @@
42 LAINCS = -I$(BUILD_ROOT)/$(FX_GLIDE_HW)/include
43 LAOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS)
44
45-AFILES = $(ASMTRISETUP) cpudtect.S
5bc2a1ab 46+AFILES = $(ASMTRISETUP) $(ASMCPUDTECT)
d1fb270e
JB
47
48 # sources
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
52@@ -966,7 +966,13 @@
53
54 /* Setup the basic proc tables based on the cpu type. */
55 {
56- _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU", _cpu_detect_asm() );
57+ _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU",
58+#ifdef __i386__
59+ _cpu_detect_asm()
60+#else
61+ 0
62+#endif
63+ );
64 GDBG_INFO(80,"\tcpu: %d\n",_GlideRoot.CPUType);
65
66 /* Default case */
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
69@@ -291,7 +291,9 @@
70 break;
71
72 case GR_HINT_FPUPRECISION:
73+#ifdef __i386__
74 hints ? double_precision_asm() : single_precision_asm();
75+#endif
76 break;
77
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)
105 ASMTRISETUP =
106+ASMCPUDTECT =
107 ATSOPTS = -DGLIDE_USE_C_TRISETUP
108 CFILES += gxdraw.c
109 else
110-
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.
115@@ -179,7 +180,7 @@
116 LAINCS = -I$(BUILD_ROOT)/$(FX_GLIDE_HW)/include
117 LAOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS)
118
119-AFILES = $(ASMTRISETUP) cpudtect.S
120+AFILES = $(ASMTRISETUP) $(ASMCPUDTECT)
121
122 # sources
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
126@@ -898,7 +898,13 @@
127 _GlideRoot.environment.gammaG = GLIDE_FGETENV("SSTH3_GGAMMA", -1.f);
128 _GlideRoot.environment.gammaB = GLIDE_FGETENV("SSTH3_BGAMMA", -1.f);
129
130- _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU", _cpu_detect_asm() );
131+ _GlideRoot.CPUType = GLIDE_GETENV("FX_CPU",
132+#ifdef __i386__
133+ _cpu_detect_asm()
134+#else
135+ 0
136+#endif
137+ );
138 GDBG_INFO(0," cpu: 0x%x\n",_GlideRoot.CPUType);
139
140 /* Setup the basic proc tables based on the cpu type. */
This page took 0.04691 seconds and 4 git commands to generate.