From c6737e9ea8077ef7f985e03a4db6cf6353ed32f6 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Wed, 9 Mar 2016 12:22:51 +0100 Subject: [PATCH] Fix PROCESSOR_ flags --- src/mc/mc_unw.cpp | 2 +- src/simix/RawContext.cpp | 4 ++-- tools/cmake/src/internal_config.h.in | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mc/mc_unw.cpp b/src/mc/mc_unw.cpp index ab43771ab2..b172da927b 100644 --- a/src/mc/mc_unw.cpp +++ b/src/mc/mc_unw.cpp @@ -202,7 +202,7 @@ int mc_unw_init_context( // Take a copy of the context for our own purpose: context->context = *c; -#if defined(PROCESSOR_x86_64) || defined(PROCESSOR_i686) +#if SIMGRID_PROCESSOR_x86_64 || SIMGRID_PROCESSOR_i686 // On x86_64, ucontext_t contains a pointer to itself for FP registers. // We don't really need support for FR registers as they are caller saved // and probably never use those fields as libunwind-x86_64 does not read diff --git a/src/simix/RawContext.cpp b/src/simix/RawContext.cpp index 1ea78060a4..4405027e62 100644 --- a/src/simix/RawContext.cpp +++ b/src/simix/RawContext.cpp @@ -123,7 +123,7 @@ extern "C" raw_stack_t raw_makecontext(void* malloced_stack, int stack_size, rawctx_entry_point_t entry_point, void* arg); extern "C" void raw_swapcontext(raw_stack_t* old, raw_stack_t new_context); -#if PROCESSOR_x86_64 +#if SIMGRID_PROCESSOR_x86_64 __asm__ ( #if defined(__APPLE__) ".text\n" @@ -203,7 +203,7 @@ __asm__ ( " pop %rdi\n" " ret\n" ); -#elif PROCESSOR_i686 +#elif SIMGRID_PROCESSOR_i686 __asm__ ( #if defined(__APPLE__) || defined(_WIN32) ".text\n" diff --git a/tools/cmake/src/internal_config.h.in b/tools/cmake/src/internal_config.h.in index 20aefcfc79..817f0fc335 100644 --- a/tools/cmake/src/internal_config.h.in +++ b/tools/cmake/src/internal_config.h.in @@ -33,9 +33,8 @@ #define HAVE_THREAD_LOCAL_STORAGE @HAVE_THREAD_LOCAL_STORAGE@ /* If __thread is available */ /* Variables for the raw contexts (to select the right assembly code) */ -#cmakedefine PROCESSOR_i686 @PROCESSOR_i686@ -#cmakedefine PROCESSOR_x86_64 @PROCESSOR_x86_64@ -#cmakedefine CMAKE_SYSTEM_PROCESSOR @CMAKE_SYSTEM_PROCESSOR@ +#define SIMGRID_PROCESSOR_i686 @PROCESSOR_i686@ +#define SIMGRID_PROCESSOR_x86_64 @PROCESSOR_x86_64@ /* Variables for the SysV contexts */ @sg_makecontext_stack_addr@ -- 2.20.1