${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Modules
)
-IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") #Intel processor 64 bits
- message(STATUS "System processor: amd64")
- set(HAVE_RAWCTX 1)
-
-ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86") #Intel processor 32 bits
- message(STATUS "System processor: x86")
- set(PROCESSOR_i686 1)
- set(HAVE_RAWCTX 1)
-
-ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
+# x86_64
+# x86
+# i.86
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES ".86")
IF(${ARCH_32_BITS})
set(PROCESSOR_i686 1)
+ set(SIMGRID_SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}")
message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}")
ELSE(${ARCH_32_BITS})
message(STATUS "System processor: amd64")
+ set(SIMGRID_SYSTEM_PROCESSOR "amd64")
set(PROCESSOR_x86_64 1)
set(PROCESSOR_i686 0)
ENDIF(${ARCH_32_BITS})
ELSE(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") #PROCESSOR NOT fIND
message(STATUS "PROCESSOR NOT FOUND: ${CMAKE_SYSTEM_PROCESSOR}")
-ENDIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES ".86")
message(STATUS "Cmake version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}")
;--------------------------------\r
\r
Name "Simgrid"\r
-outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_@CMAKE_SYSTEM_PROCESSOR@@BIN_EXE@"\r
+outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_@SIMGRID_SYSTEM_PROCESSOR@@BIN_EXE@"\r
Icon "@CMAKE_HOME_DIRECTORY@\doc\webcruft\SimGrid.ico"\r
\r
# set the default installation directory\r
return -1;\r
}\r
\r
- /* Set the instruction and the stack pointer */ \r
- ucp->uc_mcontext.Eip = (unsigned long) func;\r
+ /* Set the instruction and the stack pointer */\r
+ #ifdef I_X86_\r
+ ucp->uc_mcontext.Eip = (unsigned long) func;\r
ucp->uc_mcontext.Esp = (unsigned long) sp - 4;\r
- \r
+ #endif\r
+ #ifdef _IA64_\r
+ # error "_IA64_"\r
+ #endif\r
+ #ifdef _AMD64_\r
+ ucp->uc_mcontext.Rip = (unsigned long) func;\r
+ ucp->uc_mcontext.Rsp = (unsigned long) sp - 4;\r
+ #endif\r
+\r
/* Save/Restore the full machine context */ \r
ucp->uc_mcontext.ContextFlags = CONTEXT_FULL;\r
\r