From 083021da129a84c54093feede94a3f33912281d8 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 3 Feb 2000 02:34:26 +0000 Subject: [PATCH] no-asm patch from Darius --- acconfig.h | 5 ----- common/quakeasm.h | 6 ------ configure.in | 11 +++++++++++ qw_client/Makefile.in | 7 +++++-- qw_common/bothdefs.h | 6 ------ uquake/Makefile.in | 7 +++++-- uquake/quakedef.h | 6 ------ 7 files changed, 21 insertions(+), 27 deletions(-) diff --git a/acconfig.h b/acconfig.h index 9ac55e5..defd5d4 100644 --- a/acconfig.h +++ b/acconfig.h @@ -43,8 +43,3 @@ @BOTTOM@ -#ifdef __i386__ -#define id386 1 -#else -#define id386 0 -#endif diff --git a/common/quakeasm.h b/common/quakeasm.h index 6698e0e..3133756 100644 --- a/common/quakeasm.h +++ b/common/quakeasm.h @@ -27,12 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define __i386__ 1 #endif -#ifdef __i386__ -#define id386 1 -#else -#define id386 0 -#endif - // !!! must be kept the same as in d_iface.h !!! #define TRANSPARENT_COLOR 255 diff --git a/configure.in b/configure.in index 09708d1..9e2bf4f 100644 --- a/configure.in +++ b/configure.in @@ -496,6 +496,16 @@ case "${target}" in *) AC_MSG_RESULT(no) esac +AC_MSG_CHECKING(to see if we should disable x86 optimizations) +AC_ARG_ENABLE(asmopt, +[ --disable-asmopt Disable assembler optimization (on ia32 machines)], + NO_ASMOPT=yes, NO_ASMOPT=no +) +if test "x$NO_ASMOPT" = xyes; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi dnl Check for sound libraries AC_CHECK_LIB(mme,waveOutOpen,HAVE_LIBMME=yes) @@ -740,6 +750,7 @@ AC_SUBST(SOUND_STYLE) AC_SUBST(SOUND_LIBS) AC_SUBST(DYN_LIBS) AC_SUBST(INTEL_ARCH) +AC_SUBST(NO_ASMOPT) AC_SUBST(NET_LIBS) AC_SUBST(SYS_SRC) AC_SUBST(QW_CL_SYS_SRC) diff --git a/qw_client/Makefile.in b/qw_client/Makefile.in index 4223af5..7a55221 100644 --- a/qw_client/Makefile.in +++ b/qw_client/Makefile.in @@ -30,6 +30,7 @@ LDFLAGS = @LDFLAGS@ @SOUND_LIBS@ @NET_LIBS@ -lm LIBS = @LIBS@ CC = @CC@ INTEL_ARCH = @INTEL_ARCH@ +NO_ASMOPT = @NO_ASMOPT@ ifneq ($(SRC_DIR),.) SRC_DIR_INC = -I$(SRC_DIR) @@ -110,10 +111,11 @@ all: $(targets) # Source files # -ifeq ($(INTEL_ARCH),yes) +ifneq ($(NO_ASMOPT),yes) # Source file the Intel archictecture only +CFLAGS = -Did386=1 UQ_GENERAL_SRC = worlda.s UQ_SWREND_SRC_PLAT = dosasm.s CL_ADDITIONAL_GENERAL_SRC = sys_dosa.s math.s @@ -124,6 +126,7 @@ else # Source files for non-Intel platforms +CFLAGS = -Did386=0 SWREND_SRC_PLAT = nonintel.c endif @@ -184,7 +187,7 @@ CL_COMMON_SRC = $(MISC_SRC) $(CL_GUI_SRC) $(CL_SRC) \ # Directory specific stuff # DEFS = @DEFS@ -CFLAGS = @CFLAGS@ -DQUAKEWORLD $(OPTFLAGS) $(DEFS) -I. \ +CFLAGS += @CFLAGS@ -DQUAKEWORLD $(OPTFLAGS) $(DEFS) -I. \ $(SRC_DIR_INC) -I$(QW_COMMON_DIR) -I$(COMMON_ODIR) -I$(COMMON_DIR) GENERAL_SRC = $(CL_COMMON_SRC) \ diff --git a/qw_common/bothdefs.h b/qw_common/bothdefs.h index 87c6db9..eb8ea05 100644 --- a/qw_common/bothdefs.h +++ b/qw_common/bothdefs.h @@ -26,12 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _BOTHDEFS_H #define _BOTHDEFS_H -#if (defined(_M_IX86) || defined(__i386__)) -#define id386 1 -#else -#define id386 0 -#endif - #ifdef SERVERONLY // no asm in dedicated server #undef id386 #endif diff --git a/uquake/Makefile.in b/uquake/Makefile.in index 1632c91..0e027b3 100644 --- a/uquake/Makefile.in +++ b/uquake/Makefile.in @@ -24,6 +24,7 @@ LDFLAGS = @LDFLAGS@ @SOUND_LIBS@ @NET_LIBS@ -lm LIBS = @LIBS@ CC = @CC@ INTEL_ARCH = @INTEL_ARCH@ +NO_ASMOPT = @NO_ASMOPT@ ifneq ($(SRC_DIR),.) SRC_DIR_INC = -I$(SRC_DIR) @@ -114,10 +115,11 @@ all: $(targets) # Source files # -ifeq ($(INTEL_ARCH),yes) +ifneq ($(NO_ASMOPT),yes) # Source file the Intel archictecture only +CFLAGS = -Did386=1 UQ_GENERAL_SRC = worlda.s UQ_SWREND_SRC_PLAT = dosasm.s CL_ADDITIONAL_GENERAL_SRC = sys_dosa.s math.s @@ -128,6 +130,7 @@ else # Source files for non-Intel platforms +CFLAGS = -Did386=0 SWREND_SRC_PLAT = nonintel.c endif @@ -190,7 +193,7 @@ CL_COMMON_SRC = $(MISC_SRC) $(CL_GUI_SRC) $(CL_SRC) \ # Directory specific stuff # DEFS = @DEFS@ -CFLAGS = @CFLAGS@ $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) \ +CFLAGS += @CFLAGS@ $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) \ -I$(COMMON_ODIR) -I$(COMMON_DIR) -DUQUAKE GENERAL_SRC = $(CL_COMMON_SRC) \ diff --git a/uquake/quakedef.h b/uquake/quakedef.h index a475110..82c11af 100644 --- a/uquake/quakedef.h +++ b/uquake/quakedef.h @@ -28,12 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #endif #endif -#if defined __i386__ // && !defined __sun__ -#define id386 1 -#else -#define id386 0 -#endif - #if id386 #define UNALIGNED_OK 1 // set to 0 if unaligned accesses are not supported #else