diff options
Diffstat (limited to 'code/qcommon')
-rw-r--r-- | code/qcommon/common.c | 9 | ||||
-rw-r--r-- | code/qcommon/q_platform.h | 6 | ||||
-rw-r--r-- | code/qcommon/vm_ppc_new.c | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/code/qcommon/common.c b/code/qcommon/common.c index 5676daa..690d5bd 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -66,6 +66,7 @@ cvar_t *com_fixedtime; cvar_t *com_dropsim; // 0.0 to 1.0, simulated packet drops cvar_t *com_journal; cvar_t *com_maxfps; +cvar_t *com_altivec; cvar_t *com_timedemo; cvar_t *com_sv_running; cvar_t *com_cl_running; @@ -2425,6 +2426,7 @@ void Com_Init( char *commandLine ) { // // init commands and vars // + com_altivec = Cvar_Get ("com_altivec", "1", CVAR_ARCHIVE); com_maxfps = Cvar_Get ("com_maxfps", "85", CVAR_ARCHIVE); com_blood = Cvar_Get ("com_blood", "1", CVAR_ARCHIVE); @@ -2507,7 +2509,12 @@ void Com_Init( char *commandLine ) { Cvar_Set("ui_singlePlayerActive", "0"); com_fullyInitialized = qtrue; - Com_Printf ("--- Common Initialization Complete ---\n"); + + #if idppc_altivec + Com_Printf ("Altivec support is %s\n", com_altivec->integer ? "enabled" : "disabled"); + #endif + + Com_Printf ("--- Common Initialization Complete ---\n"); } //================================================================== diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h index 870a4cc..f68676f 100644 --- a/code/qcommon/q_platform.h +++ b/code/qcommon/q_platform.h @@ -51,6 +51,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define idppc_altivec 0 #endif +#if (MACOS_X) // Apple's GCC does this differently than the FSF. + #define VECCONST_UINT8(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) (vector unsigned char) (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) +#else + #define VECCONST_UINT8(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) (vector unsigned char) {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p} +#endif + #endif #ifndef __ASM_I386__ // don't include the C bits if included from qasm.h diff --git a/code/qcommon/vm_ppc_new.c b/code/qcommon/vm_ppc_new.c index 955b136..17cc405 100644 --- a/code/qcommon/vm_ppc_new.c +++ b/code/qcommon/vm_ppc_new.c @@ -1820,7 +1820,7 @@ asm ( #if defined(MACOS_X) && defined(__OPTIMIZE__) // On Mac OS X, gcc doesn't push a frame when we are optimized, so trying to tear it down results in grave disorder. -#warning Mac OS X optimization on, not popping GCC AsmCall frame +//#warning Mac OS X optimization on, not popping GCC AsmCall frame #else // Mac OS X Server and unoptimized compiles include a GCC AsmCall frame asm ( |