ASM Sources!!!!!!!!!!!!!!!!!!!!!!
Moderator: InsideQC Admins
8 posts
• Page 1 of 1
ASM Sources!!!!!!!!!!!!!!!!!!!!!!
How would I go about getting rid of these ASM source files in GLQuake
- Stroggos
- Posts: 50
- Joined: Tue Apr 14, 2009 11:40 am
- Location: Australia
REWRITE THE CODE TO NOT USE ASM!!!!!!!!!!!!!!!!!!!!!!
edit: Heh, same number of exclamation marks. Must be the threshold of sanity there.
edit: Heh, same number of exclamation marks. Must be the threshold of sanity there.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
- Spirit
- Posts: 1031
- Joined: Sat Nov 20, 2004 9:00 pm
it's pretty easy -- there are about a dozen ASM functions in the glquake source. Of those, only about a third are necessary and they all have C replacements, another third have C replacements that are empty (i.e. not needed at all, they just set some flags on the CPU), and the last third are never actually called.
So you just use the C versions for the first category, and rip out the second and third categories entirely.
So you just use the C versions for the first category, and rip out the second and third categories entirely.
- metlslime
- Posts: 316
- Joined: Tue Feb 05, 2008 11:03 pm
yeah, the assembler code is entirely optional.
its slightly faster, but tbh that's more because it has a better algorithm in a few places (its not 100% identical to the C code). Of course, that really only affects the sw renderer.
Just remove the files and then figure out how to enable the C versions of the functions.
its slightly faster, but tbh that's more because it has a better algorithm in a few places (its not 100% identical to the C code). Of course, that really only affects the sw renderer.
Just remove the files and then figure out how to enable the C versions of the functions.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Re: ASM Sources!!!!!!!!!!!!!!!!!!!!!!
Sorry to bump this, but i'm trying to remove the .S files from my SDLQuake build and having no luck with. Does anyone know how to properly get rid of ASM files?
- JasonX
- Posts: 411
- Joined: Tue Apr 21, 2009 2:08 pm
Re: ASM Sources!!!!!!!!!!!!!!!!!!!!!!
1. Remove the .s files from your project.
Find anything that says:
#if id386
or
#ifdef id386
And delete it the block of code through the #else or #endif. Or change those to #if conditions to #if 0 if you want to be conservative.
Find anything that is
#if !id386 or #ifndef id386 and change to #if 1
Make sure nonintel.c is not in your project.
That's the short version. And the short version will do want you want. You'll have unnecessary stuff loitering around that is harmless. Like empty functions that are shells for NOT setting floating precision for ASM and other remnants but it doesn't hurt anything.
Find anything that says:
#if id386
or
#ifdef id386
And delete it the block of code through the #else or #endif. Or change those to #if conditions to #if 0 if you want to be conservative.
Find anything that is
#if !id386 or #ifndef id386 and change to #if 1
Make sure nonintel.c is not in your project.
That's the short version. And the short version will do want you want. You'll have unnecessary stuff loitering around that is harmless. Like empty functions that are shells for NOT setting floating precision for ASM and other remnants but it doesn't hurt anything.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: ASM Sources!!!!!!!!!!!!!!!!!!!!!!
Baker wrote:That's the short version. And the short version will do want you want.
Or you could just turn off ASM by switching one little define in quakedef.h
i'd still use asm even if it's glquake - asm for sound mixing is still relevant
i should not be here
- leileilol
- Posts: 2783
- Joined: Fri Oct 15, 2004 3:23 am
Re: ASM Sources!!!!!!!!!!!!!!!!!!!!!!
leileilol wrote:Baker wrote:That's the short version. And the short version will do want you want.
Or you could just turn off ASM by switching one little define in quakedef.h
i'd still use asm even if it's glquake - asm for sound mixing is still relevant
Sometimes the define is in the source and with some of projects it is in the compile arguments, depending on the source base. I kinda wanted to avoid discussing that so I avoided that. But yeah, true.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest