restrict #pragma optimize to Visual Studio builds

This commit is contained in:
sezero
2018-08-10 20:36:10 +03:00
parent f3ed63fc58
commit 043f38b035
43 changed files with 131 additions and 87 deletions

View File

@@ -23,7 +23,7 @@
**
*/
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -177,6 +177,6 @@ sst1SetGrxClk_Canopus(FxU32* sstbase, FFLOAT grxclk)
return(RetVal);
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
** Initialization code for initializing supported SST-1 DACs
**
*/
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -1366,6 +1366,6 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitDacIndexedEnable(FxU32 *sstbase,
return(FXTRUE);
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
** Initialization code for loading SST-1 gamma tables
**
*/
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -247,6 +247,6 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitGammaTable(FxU32 *sstbase, FxU32 nentries, Fx
return(FXTRUE);
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -22,7 +22,7 @@
** configuration information.
**
*/
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -650,6 +650,6 @@ FxBool sst1InitFillDeviceInfo(FxU32 *sstbase, sst1DeviceInfoStruct *info)
return(FXTRUE);
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
** Parsing code for grabbing information from "voodoo2.ini" initialization file
**
*/
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -1116,6 +1116,6 @@ FX_ENTRY char* FX_CALL sst1InitGetenv(char *string)
}
#endif /* INIT_DOS */
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -20,7 +20,7 @@
**
** Print functions for SST-1 Initialization routines
*/
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -79,6 +79,6 @@ FX_ENTRY void FX_CALL sst1InitVPrintf(const char *format, va_list args)
#endif
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
** Initialization code for initializing scanline interleaving
**
*/
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -733,6 +733,6 @@ sst1InitSliPaired(FxU32 *sstbase)
return sliPaired;
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -136,7 +136,7 @@
** VOODOO2_PATH path Path used to locate "voodoo2.ini" file
**
*/
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -330,8 +330,7 @@ FX_EXPORT FxU32 * FX_CSTYLE sst1InitMapBoardDirect(FxU32 BoardNumber,
#ifdef __WIN32__
MessageBox(NULL, pciGetErrorString(), NULL, MB_OK);
INIT_PRINTF(("sst1InitMapBoard(): 0x%X\n", GetLastError()));
#endif // __WIN32__
#endif
INIT_PRINTF(("pciError(): %s", pciGetErrorString()));
@@ -1317,6 +1316,6 @@ sst1InitCachingAMD(FxU32* sstBase, FxBool enableP, FxBool hasP2MTRR)
return retVal;
} // sst1InitSetCachingAMD
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -74,7 +74,9 @@
#else /* DIRECTX */
#include "ddglobal.h"
#ifdef _MSC_VER
#pragma optimize ("",off) /* ddglobal.h tuns this on for retail builds */
#endif
#undef INIT_PRINTF
#undef INIT_INFO
#undef GETENV

View File

@@ -21,7 +21,7 @@
** Utility routines for SST-1 Initialization code
**
*/
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -1176,6 +1176,6 @@ void sst1InitDrawRectUsingTris(FxU32 *sstbase, FxU32 x, FxU32 y, FxU32 tSize)
ISET(sst->triangleCMD, 0xFFFFFFFF);
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
** Initialization code for initializing SST-1 video unit
**
*/
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -1458,6 +1458,6 @@ setDelays:
return(FXTRUE);
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -19,7 +19,9 @@
**
** Initialization code for initializing supported SST-1 DACs
*/
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@@ -1203,4 +1205,6 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitDacIndexedEnable(FxU32 *sstbase,
return(FXTRUE);
}
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -20,7 +20,9 @@
** Initialization code for loading SST-1 gamma tables
**
*/
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@@ -249,4 +251,6 @@ FxU32 *r, FxU32 *g, FxU32 *b)
return(FXTRUE);
}
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,9 @@
** configuration information.
**
*/
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <sst.h>
@@ -582,4 +584,7 @@ FxBool sst1InitFillDeviceInfo(FxU32 *sstbase, sst1DeviceInfoStruct *info)
return(FXTRUE);
}
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -20,7 +20,9 @@
** Parsing code for grabbing information from "voodoo.ini" initialization file
**
*/
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -913,4 +915,6 @@ myGetenv(const char* envKey)
: NULL);
}
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -19,7 +19,9 @@
**
** Print functions for SST-1 Initialization routines
*/
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
@@ -74,4 +76,6 @@ FX_ENTRY void FX_CALL sst1InitVPrintf(const char *format, va_list args)
#endif
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -20,7 +20,9 @@
** Initialization code for initializing scanline interleaving
**
*/
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@@ -537,4 +539,6 @@ FX_ENTRY FxU32 FX_CALL sst1InitSliDetect(FxU32 *sstbase)
return(sliDetected);
}
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -119,7 +119,9 @@
**
*/
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@@ -898,5 +900,6 @@ sst1InitCachingOn(void)
} /* sst1InitSetCacheType */
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -69,7 +69,9 @@
#else /* DIRECTX */
#include "ddglobal.h"
#ifdef _MSC_VER
#pragma optimize ("",off) /* ddglobal.h tuns this on for retail builds */
#endif
#undef INIT_PRINTF
#undef INIT_INFO
#undef GETENV

View File

@@ -20,7 +20,9 @@
** Utility routines for SST-1 Initialization code
**
*/
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@@ -352,4 +354,6 @@ FX_EXPORT FxU32 FX_CSTYLE sst1InitRead32(FxU32 *addr)
return(*addr);
}
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -20,7 +20,9 @@
** Initialization code for initializing SST-1 video unit
**
*/
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@@ -1099,4 +1101,6 @@ FX_ENTRY FxBool FX_CALL sst1InitSetTripleBuffering(FxU32 *sstbase,
return(FXTRUE);
}
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -22,7 +22,7 @@
**
*/
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -176,6 +176,6 @@ sst1SetGrxClk_Canopus(FxU32* sstbase, FFLOAT grxclk)
return(RetVal);
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -23,7 +23,7 @@
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -1368,6 +1368,6 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitDacIndexedEnable(FxU32 *sstbase,
return(FXTRUE);
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
**
*/
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -247,6 +247,6 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitGammaTable(FxU32 *sstbase, FxU32 nentries, Fx
return(FXTRUE);
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -22,7 +22,7 @@
**
*/
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -660,6 +660,6 @@ FxBool sst1InitFillDeviceInfo(FxU32 *sstbase, sst1DeviceInfoStruct *info)
return(FXTRUE);
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
**
*/
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -1161,6 +1161,6 @@ FX_ENTRY char* FX_CALL sst1InitGetenv(char *string)
}
#endif /* INIT_DOS */
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -19,7 +19,7 @@
**
** Print functions for SST-1 Initialization routines
*/
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -78,6 +78,6 @@ FX_ENTRY void FX_CALL sst1InitVPrintf(const char *format, va_list args)
#endif
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
**
*/
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -740,6 +740,6 @@ sst1InitSliPaired(FxU32 *sstbase)
return sliPaired;
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -139,7 +139,7 @@
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -334,8 +334,7 @@ FX_EXPORT FxU32 * FX_CSTYLE sst1InitMapBoardDirect(FxU32 BoardNumber,
#ifdef __WIN32__
MessageBox(NULL, pciGetErrorString(), NULL, MB_OK);
INIT_PRINTF(("sst1InitMapBoard(): 0x%X\n", GetLastError()));
#endif // __WIN32__
#endif
INIT_PRINTF(("pciError(): %s", pciGetErrorString()));
@@ -1324,6 +1323,6 @@ sst1InitCachingAMD(FxU32* sstBase, FxBool enableP, FxBool hasP2MTRR)
return retVal;
} // sst1InitSetCachingAMD
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -74,7 +74,9 @@
#else /* DIRECTX */
#include "ddglobal.h"
#ifdef _MSC_VER
#pragma optimize ("",off) /* ddglobal.h tuns this on for retail builds */
#endif
#undef INIT_PRINTF
#undef INIT_INFO
#undef GETENV

View File

@@ -23,7 +23,7 @@
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -1180,6 +1180,6 @@ void sst1InitDrawRectUsingTris(FxU32 *sstbase, FxU32 x, FxU32 y, FxU32 tSize)
ISET(sst->triangleCMD, 0xFFFFFFFF);
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
**
*/
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -1471,6 +1471,6 @@ setDelays:
return(FXTRUE);
}
#ifdef __WIN32__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -6481,7 +6481,9 @@ static void hwcReadRegion1555(hwcBoardInfo *bInfo, FxU32 src, FxU32 src_x, FxU32
}
}
#ifdef _MSC_VER
//#pragma optimize("g", off)
#endif
static void hwcReadRegion8888(hwcBoardInfo *bInfo, FxU32 src, FxU32 src_x, FxU32 src_y, FxU32 src_width, FxU32 src_height, FxU32 strideInBytes, FxU16 *dst, FxU32 renderMask, FxU32 compareMask)
{
FxU32 end_x, end_y;

View File

@@ -22,7 +22,7 @@
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -1208,6 +1208,6 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitDacIndexedEnable(FxU32 *sstbase,
return(FXTRUE);
}
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
**
*/
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -252,6 +252,6 @@ FxU32 *r, FxU32 *g, FxU32 *b)
return(FXTRUE);
}
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -22,7 +22,7 @@
**
*/
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -585,6 +585,6 @@ FxBool sst1InitFillDeviceInfo(FxU32 *sstbase, sst1DeviceInfoStruct *info)
return(FXTRUE);
}
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
**
*/
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -964,6 +964,6 @@ myGetenv(const char* envKey)
: NULL);
}
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -19,7 +19,7 @@
**
** Print functions for SST-1 Initialization routines
*/
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -76,7 +76,7 @@ FX_ENTRY void FX_CALL sst1InitVPrintf(const char *format, va_list args)
#endif
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
**
*/
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -548,6 +548,6 @@ FX_ENTRY FxU32 FX_CALL sst1InitSliDetect(FxU32 *sstbase)
return(sliDetected);
}
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -119,7 +119,7 @@
**
*/
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -900,6 +900,6 @@ sst1InitCachingOn(void)
} /* sst1InitSetCacheType */
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -69,7 +69,9 @@
#else /* DIRECTX */
#include "ddglobal.h"
#ifdef _MSC_VER
#pragma optimize ("",off) /* ddglobal.h tuns this on for retail builds */
#endif
#undef INIT_PRINTF
#undef INIT_INFO
#undef GETENV

View File

@@ -23,7 +23,7 @@
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -357,6 +357,6 @@ FX_EXPORT FxU32 FX_CSTYLE sst1InitRead32(FxU32 *addr)
return(*addr);
}
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif

View File

@@ -21,7 +21,7 @@
**
*/
#undef FX_DLL_ENABLE /* so that we don't dllexport the symbols */
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",off)
#endif
#include <stdio.h>
@@ -1113,6 +1113,6 @@ FX_ENTRY FxBool FX_CALL sst1InitSetTripleBuffering(FxU32 *sstbase,
return(FXTRUE);
}
#ifndef __GNUC__
#ifdef _MSC_VER
#pragma optimize ("",on)
#endif