Update of /cvsroot/opentnl/tnl/tnl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29433/tnl
Modified Files:
tnlMethodDispatch.cpp tnlMethodDispatch.h
Log Message:
Updated VC 6.0 project file
Updated tnlMethodDispatch for broken VC 6 inline assembly
Index: tnlMethodDispatch.cpp
===================================================================
RCS file: /cvsroot/opentnl/tnl/tnl/tnlMethodDispatch.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** tnlMethodDispatch.cpp 19 Aug 2004 21:20:15 -0000 1.14
--- tnlMethodDispatch.cpp 21 Aug 2004 03:40:28 -0000 1.15
***************
*** 28,34 ****
#include "tnlNetStringTable.h"
namespace TNL
{
- void *gBasePtr = NULL;
void *gThisPtr = NULL;
void *gStackPtr = NULL;
--- 28,35 ----
#include "tnlNetStringTable.h"
+ void *TNL_gBasePtr = NULL;
+
namespace TNL
{
void *gThisPtr = NULL;
void *gStackPtr = NULL;
***************
*** 233,237 ****
bool floatInRegs = true;
#else
! U8 *ptr = (U8 *) gBasePtr;
ptr += 4; // get rid of the return address and saved base ptr.
#endif
--- 234,238 ----
bool floatInRegs = true;
#else
! U8 *ptr = (U8 *) TNL_gBasePtr;
ptr += 4; // get rid of the return address and saved base ptr.
#endif
Index: tnlMethodDispatch.h
===================================================================
RCS file: /cvsroot/opentnl/tnl/tnl/tnlMethodDispatch.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** tnlMethodDispatch.h 19 Aug 2004 21:20:15 -0000 1.5
--- tnlMethodDispatch.h 21 Aug 2004 03:40:28 -0000 1.6
***************
*** 146,157 ****
#if defined(TNL_SUPPORTS_VC_INLINE_X86_ASM)
! extern void *gBasePtr;
! #define SAVE_PARAMS __asm { lea eax, this }; __asm { mov TNL::gBasePtr, eax };
#elif defined(TNL_SUPPORTS_GCC_INLINE_X86_ASM )
! extern void *gBasePtr;
! #define SAVE_PARAMS TNL::gBasePtr = (void *) ((U8 *) __builtin_frame_address(0) + 8);
#elif defined(TNL_SUPPORTS_GCC_INLINE_PPC_ASM )
--- 146,164 ----
#if defined(TNL_SUPPORTS_VC_INLINE_X86_ASM)
+ };
! // VC 6.0 has problems with the usage of a namespace reference inside an inline assembly block
! // so we close the namespace and add this as a global global.
!
! extern void *TNL_gBasePtr;
! namespace TNL {
! #define SAVE_PARAMS __asm { lea eax, this }; __asm { mov TNL_gBasePtr, eax };
#elif defined(TNL_SUPPORTS_GCC_INLINE_X86_ASM )
! };
! extern void *TNL_gBasePtr;
! namespace TNL {
! #define SAVE_PARAMS TNL_gBasePtr = (void *) ((U8 *) __builtin_frame_address(0) + 8);
#elif defined(TNL_SUPPORTS_GCC_INLINE_PPC_ASM )
|