File: z03-amd64-port

package info (click to toggle)
glide 2002.04.10ds1-15
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 59,556 kB
  • sloc: ansic: 290,125; asm: 23,305; sh: 8,089; pascal: 3,854; makefile: 1,276; perl: 73
file content (91 lines) | stat: -rw-r--r-- 3,708 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Status: not-applied

Index: b/glide3x/configure.in
===================================================================
--- a/glide3x/configure.in
+++ b/glide3x/configure.in
@@ -146,7 +146,7 @@ AC_ARG_ENABLE([build-architecture],
               [dnl
   --enable-build-architecture Enable AMD 3DNow instructions [default=current]],
               [case ${enableval} in
-               i[3456]86|alpha)
+               i[3456]86|x86_64|alpha)
                    FX_GLIDE_BUILD_ARCHITECTURE=${enableval}
                    ;;
                *)
@@ -185,6 +185,10 @@ fi
 if test "$FX_GLIDE_BUILD_ARCHITECTURE" = "ia64"; then
 FX_GLIDE_CTRISETUP=true
 fi
+if test "$FX_GLIDE_BUILD_ARCHITECTURE" = "x86_64"; then
+FX_GLIDE_CTRISETUP=true
+FX_GLIDE_C_CPU_DETECT=true
+fi
 # Next, we read some configuration options
 # statically.  This is to avoid creating a bunch of
 # not-terribly-useful --enable options.
Index: b/glide3x/cvg/init/sst1init.h
===================================================================
--- a/glide3x/cvg/init/sst1init.h
+++ b/glide3x/cvg/init/sst1init.h
@@ -146,7 +146,7 @@ p6Fence(void);
 #  define P6FENCE {_asm xchg eax, p6FenceVar}
 #elif defined(macintosh) && __POWERPC__ && defined(__MWERKS__)
 #  define P6FENCE __eieio()
-#elif defined (__GNUC__) && defined(__i386__)
+#elif defined (__GNUC__) && (defined(__i386__) || defined(__x86_64__))
 #  define P6FENCE asm("xchg %%eax,%0" : /*outputs*/ : "m" (p6FenceVar) : \
 					"eax");
 #else
Index: b/glide3x/h3/glide3/src/fxglide.h
===================================================================
--- a/glide3x/h3/glide3/src/fxglide.h
+++ b/glide3x/h3/glide3/src/fxglide.h
@@ -1488,7 +1488,7 @@ extern GrGCFuncs _curGCFuncs;
 #  pragma warning(default : 4035)
 #elif defined(macintosh) && defined(__POWERPC__) && defined(__MWERKS__)
 #  define P6FENCE __eieio()
-#elif defined(__GNUC__) && defined(__i386__)
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
 #define P6FENCE asm("xchg %%eax, %0" : : "m" (_GlideRoot.p6Fencer) : "eax");
 #elif defined(__GNUC__) && defined(__ia64__)
 #define P6FENCE asm volatile("mf.a" ::: "memory")
Index: b/glide3x/h3/minihwc/linhwc.c.dri
===================================================================
--- a/glide3x/h3/minihwc/linhwc.c.dri
+++ b/glide3x/h3/minihwc/linhwc.c.dri
@@ -71,7 +71,7 @@ static FxU32 fenceVar;
 #define P6FENCE asm volatile("mf.a" ::: "memory");
 #elif defined(__alpha__)
 #define P6FENCE asm volatile("mb" ::: "memory");
-#elif defined(__i386__)
+#elif defined(__i386__) || defined(__x86_64__)
 #define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
 #else
 #error Need to Define P6FENCE for this architecture
Index: b/glide3x/h5/glide3/src/fxglide.h
===================================================================
--- a/glide3x/h5/glide3/src/fxglide.h
+++ b/glide3x/h5/glide3/src/fxglide.h
@@ -2093,7 +2093,7 @@ extern GrGCFuncs _curGCFuncs;
 #  pragma warning(default : 4035)
 #elif defined(macintosh) && defined(__POWERPC__) && defined(__MWERKS__)
 #  define P6FENCE __sync()
-#elif defined(__GNUC__) && defined(__i386__)
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
 /*
  * This is the __linux__ code.
  */
Index: b/glide3x/h5/minihwc/linhwc.c
===================================================================
--- a/glide3x/h5/minihwc/linhwc.c
+++ b/glide3x/h5/minihwc/linhwc.c
@@ -67,7 +67,7 @@ hwcCheckMemSize(hwcBoardInfo *bInfo, FxU
 #include "lindri.h"
 
 static FxU32 fenceVar;
-#if defined(__i386__)
+#if defined(__i386__) || defined(__x86_64__)
 #define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
 #elif defined(__alpha__)
 #define P6FENCE asm volatile("mb" ::: "memory")