Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Determine assembly flavor at a single place.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 26 Sep 2013 13:04:35 +0000 (15:04 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 26 Sep 2013 13:04:35 +0000 (15:04 +0200)
In smx_context_raw.c, check if variable exists *and* has a nonnull value
(and not only if it's defined).

CMakeLists.txt
buildtools/Cmake/CompleteInFiles.cmake
src/simix/smx_context_raw.c

index e5edbe6..b68c503 100644 (file)
@@ -190,10 +190,6 @@ endif()
 
 include_directories(${INCLUDES})
 
-### Determine the assembly flavor that we need today
-include(CMakeDetermineSystem)
-set(PROCESSOR_${CMAKE_SYSTEM_PROCESSOR} 1)
-
 ### Setup Options
 include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Option.cmake)
 
index 02fb735..319f8f0 100644 (file)
@@ -7,14 +7,15 @@ set(CMAKE_MODULE_PATH
 # x86
 # i.86
 
+### Determine the assembly flavor that we need today
+include(CMakeDetermineSystem)
 IF(CMAKE_SYSTEM_PROCESSOR MATCHES ".86")
   IF(${ARCH_32_BITS})
+    message(STATUS "System processor: i686 (${CMAKE_SYSTEM_PROCESSOR}, 32 bits)")
     set(PROCESSOR_i686 1)
-    message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}")
   ELSE()
-    message(STATUS "System processor: amd64")
+    message(STATUS "System processor: x86_64 (${CMAKE_SYSTEM_PROCESSOR}, 64 bits)")
     set(PROCESSOR_x86_64 1)
-    set(PROCESSOR_i686 0)
   ENDIF()
   set(HAVE_RAWCTX 1)
 
index bd78c9c..2fdb6d9 100644 (file)
@@ -44,7 +44,7 @@ extern raw_stack_t raw_makecontext(char* malloced_stack, int stack_size,
                                    rawctx_entry_point_t entry_point, void* arg);
 extern void raw_swapcontext(raw_stack_t* old, raw_stack_t new);
 
-#ifdef PROCESSOR_x86_64
+#if PROCESSOR_x86_64
 __asm__ (
 #if defined(APPLE)
    ".text\n"