Advertisement

CMake project fix for MSVC x86_64

Started by August 05, 2012 10:14 AM
0 comments, last by WitchLord 12 years, 5 months ago
Since there's an assembly file for MSVC x86_64 this should be added before or after the ANDROID block in sdk/AngelScript/projects/cmake/CMakeLists.txt:

if(MSVC AND CMAKE_CL_64)
enable_language(ASM_MASM)
if(CMAKE_ASM_MASM_COMPILER_WORKS)
set(ANGELSCRIPT_SOURCE ${ANGELSCRIPT_SOURCE} ../../source/as_callfunc_x64_msvc_asm.asm)
else()
message(FATAL ERROR "MSVC x86_64 target requires a working assembler")
endif()
endif()


I also had to edit the code block around line 1131 in angelscript.h from if(sizeof(void*) == 4) to #ifndef AS_64BIT_PTR, otherwise the compiler would complain about not being able to static cast the data types involved when trying to register CallMe1 in testmultipleinheritance.cpp.

BTW TestSaveLoad reports (but still says it passed)
The saved byte code is not of the expected size. It is 1760 bytes
The saved byte code contains a different amount of zeroes than the expected. Co
nted 530
The saved byte code has different checksum than the expected. Got 0x87C6163E


Not sure if that's a real problem or not as the test passed anyway.
I've checked in these changes, as well as a bug fix in the bytecode saving in revision 1383.

The output from TestSaveLoad was because of a 64bit bug, however it didn't show itself on Linux 64bit. I attribute this to the fact that Microsoft forces all user memory to be mapped to addresses above 4GB, presumably to catch these kind of bugs more easily.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement