From 9f0280bca16db1ad529f49ee8ddbd6c2edf770e4 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 22 Aug 2025 23:55:03 +0100 Subject: [PATCH] Remove unused matha.S Before commit a7d33b1c "(bug #3639) BoxOnPlaneSide rewrite" there was more code here, but since then the only thing left is the Invert24To16 function, to which I couldn't find any references since the beginning of ioquake3's git history. Resolves: https://github.com/ioquake/ioq3/issues/774 Signed-off-by: Simon McVittie --- Makefile | 2 - cmake/compilers/gnu.cmake | 1 - code/asm/matha.S | 54 ------------------- misc/xcode/ioquake3.xcodeproj/project.pbxproj | 4 -- 4 files changed, 61 deletions(-) delete mode 100644 code/asm/matha.S diff --git a/Makefile b/Makefile index 0fa793cd..98c1c7ba 100644 --- a/Makefile +++ b/Makefile @@ -2173,7 +2173,6 @@ endif ifeq ($(ARCH),x86) Q3OBJ += \ $(B)/client/snd_mixa.o \ - $(B)/client/matha.o \ $(B)/client/snapvector.o \ $(B)/client/ftola.o endif @@ -2534,7 +2533,6 @@ Q3DOBJ = \ ifeq ($(ARCH),x86) Q3DOBJ += \ - $(B)/ded/matha.o \ $(B)/ded/snapvector.o \ $(B)/ded/ftola.o endif diff --git a/cmake/compilers/gnu.cmake b/cmake/compilers/gnu.cmake index f18b07a4..5a7ed5dc 100644 --- a/cmake/compilers/gnu.cmake +++ b/cmake/compilers/gnu.cmake @@ -8,7 +8,6 @@ enable_language(ASM) set(ASM_SOURCES ${SOURCE_DIR}/asm/ftola.c - ${SOURCE_DIR}/asm/matha.S ${SOURCE_DIR}/asm/snapvector.c ) diff --git a/code/asm/matha.S b/code/asm/matha.S deleted file mode 100644 index 88974d30..00000000 --- a/code/asm/matha.S +++ /dev/null @@ -1,54 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -// -// math.s -// x86 assembly-language math routines. - -#include "qasm.h" - - -#if id386 - - .text - -// TODO: rounding needed? -// stack parameter offset -#define val 4 - -.globl C(Invert24To16) -C(Invert24To16): - - movl val(%esp),%ecx - movl $0x100,%edx // 0x10000000000 as dividend - cmpl %edx,%ecx - jle LOutOfRange - - subl %eax,%eax - divl %ecx - - ret - -LOutOfRange: - movl $0xFFFFFFFF,%eax - ret - -#endif // id386 diff --git a/misc/xcode/ioquake3.xcodeproj/project.pbxproj b/misc/xcode/ioquake3.xcodeproj/project.pbxproj index 290aa8e4..8e9f4c0a 100644 --- a/misc/xcode/ioquake3.xcodeproj/project.pbxproj +++ b/misc/xcode/ioquake3.xcodeproj/project.pbxproj @@ -52,7 +52,6 @@ 274FAB79178FA81800B17C7A /* snd_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 274FAB78178FA81700B17C7A /* snd_main.c */; }; 274FAB7B178FA86E00B17C7A /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 274FAB7A178FA86E00B17C7A /* md5.c */; }; 274FAB88178FA98E00B17C7A /* snd_mixa.s in Sources */ = {isa = PBXBuildFile; fileRef = 274FAB82178FA97100B17C7A /* snd_mixa.s */; }; - 274FAB8A178FA9AA00B17C7A /* matha.s in Sources */ = {isa = PBXBuildFile; fileRef = 274FAB7E178FA97100B17C7A /* matha.s */; }; 274FABFD178FAC4900B17C7A /* vm_x86.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BE9E14D136DF005EB142 /* vm_x86.c */; }; 274FABFE178FAC6E00B17C7A /* tr_noise.c in Sources */ = {isa = PBXBuildFile; fileRef = 27AAD064178E03620093DFC0 /* tr_noise.c */; }; 2758BB3317905B8F007F6582 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2758BB3217905B8F007F6582 /* IOKit.framework */; }; @@ -173,7 +172,6 @@ 274FAB78178FA81700B17C7A /* snd_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_main.c; sourceTree = ""; }; 274FAB7A178FA86E00B17C7A /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = md5.c; sourceTree = ""; }; 274FAB7D178FA97100B17C7A /* ftola.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ftola.c; sourceTree = ""; }; - 274FAB7E178FA97100B17C7A /* matha.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = matha.s; sourceTree = ""; }; 274FAB7F178FA97100B17C7A /* qasm-inline.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "qasm-inline.h"; sourceTree = ""; }; 274FAB80178FA97100B17C7A /* qasm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = qasm.h; sourceTree = ""; }; 274FAB81178FA97100B17C7A /* snapvector.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = snapvector.c; sourceTree = ""; }; @@ -597,7 +595,6 @@ isa = PBXGroup; children = ( 274FAB7D178FA97100B17C7A /* ftola.c */, - 274FAB7E178FA97100B17C7A /* matha.s */, 274FAB7F178FA97100B17C7A /* qasm-inline.h */, 274FAB80178FA97100B17C7A /* qasm.h */, 274FAB81178FA97100B17C7A /* snapvector.c */, @@ -925,7 +922,6 @@ 274FAB79178FA81800B17C7A /* snd_main.c in Sources */, 274FAB7B178FA86E00B17C7A /* md5.c in Sources */, 274FAB88178FA98E00B17C7A /* snd_mixa.s in Sources */, - 274FAB8A178FA9AA00B17C7A /* matha.s in Sources */, 274FABFD178FAC4900B17C7A /* vm_x86.c in Sources */, 274FABFE178FAC6E00B17C7A /* tr_noise.c in Sources */, A1F318612603128500A11B0E /* snapvector.c in Sources */,