Skip to content

Commit

Permalink
Revert a few more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
akoeplinger committed Feb 14, 2023
1 parent f0f3390 commit c28bfd1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/pal/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_FREEBSD)
# On OSX platforms and *BSD, we use the libunwind that's part of the OS
# On OSX and *BSD, we use the libunwind that's part of the OS
set(CLR_CMAKE_USE_SYSTEM_LIBUNWIND 1)
endif(CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_FREEBSD)

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/pal/src/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ elseif(CLR_CMAKE_TARGET_SUNOS)
set(CMAKE_REQUIRED_INCLUDES /opt/local/include)
endif()

if(CLR_CMAKE_TARGET_APPLE)
if(CLR_CMAKE_TARGET_OSX)
set(CMAKE_REQUIRED_DEFINITIONS -D_XOPEN_SOURCE)
elseif(NOT CLR_CMAKE_TARGET_FREEBSD AND NOT CLR_CMAKE_TARGET_NETBSD)
set(CMAKE_REQUIRED_DEFINITIONS "-D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L")
Expand Down
10 changes: 5 additions & 5 deletions src/coreclr/pal/src/include/pal/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ const fpsimd_context* GetConstNativeSigSimdContext(const native_context_t *mc)
return GetNativeSigSimdContext(const_cast<native_context_t*>(mc));
}

#else // !defined(TARGET_OSX)
#else // TARGET_OSX

#define MCREG_X0(mc) ((mc)->__ss.__x[0])
#define MCREG_X1(mc) ((mc)->__ss.__x[1])
Expand Down Expand Up @@ -623,7 +623,7 @@ const _STRUCT_ARM_NEON_STATE64* GetConstNativeSigSimdContext(const native_contex
return GetNativeSigSimdContext(const_cast<native_context_t*>(mc));
}

#endif // !defined(TARGET_OSX)
#endif // TARGET_OSX

#elif defined(HOST_LOONGARCH64)

Expand Down Expand Up @@ -663,7 +663,7 @@ const _STRUCT_ARM_NEON_STATE64* GetConstNativeSigSimdContext(const native_contex

#else // HOST_ARM64

#if defined(TARGET_OSX)
#ifdef TARGET_OSX

#define MCREG_Rbp(mc) ((mc)->__ss.__rbp)
#define MCREG_Rip(mc) ((mc)->__ss.__rip)
Expand Down Expand Up @@ -711,7 +711,7 @@ inline void *FPREG_Xstate_Ymmh(const ucontext_t *uc)
return reinterpret_cast<void *>(&((_STRUCT_X86_AVX_STATE64&)FPSTATE(uc)).__fpu_ymmh0);
}

#else // defined(TARGET_OSX)
#else //TARGET_OSX

// For FreeBSD, as found in x86/ucontext.h
#define MCREG_Rbp(mc) ((mc).mc_rbp)
Expand Down Expand Up @@ -748,7 +748,7 @@ inline void *FPREG_Xstate_Ymmh(const ucontext_t *uc)

#define FPREG_Xmm(uc, index) *(M128A*) &(FPSTATE(uc)->sv_xmm[index])
#define FPREG_St(uc, index) *(M128A*) &(FPSTATE(uc)->sv_fp[index].fp_acc)
#endif // defined(TARGET_OSX)
#endif // TARGET_OSX
#endif // HOST_ARM64

#else // HOST_64BIT
Expand Down
5 changes: 2 additions & 3 deletions src/coreclr/pal/src/thread/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2473,7 +2473,7 @@ InitializeFlushProcessWriteBuffers()
}
}

#ifdef TARGET_APPLE
#ifdef TARGET_OSX
return TRUE;
#else
s_helperPage = static_cast<int*>(mmap(0, GetVirtualPageSize(), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0));
Expand Down Expand Up @@ -2503,7 +2503,7 @@ InitializeFlushProcessWriteBuffers()
}

return status == 0;
#endif // TARGET_APPLE
#endif // TARGET_OSX
}

#define FATAL_ASSERT(e, msg) \
Expand Down Expand Up @@ -2570,7 +2570,6 @@ FlushProcessWriteBuffers()
// Request the threads pointer values to force the thread to emit a memory barrier
size_t registers = 128;
machret = thread_get_register_pointer_values(pThreads[i], &sp, &registers, registerValues);

if (machret == KERN_INSUFFICIENT_BUFFER_SIZE)
{
CHECK_MACH("thread_get_register_pointer_values()", machret);
Expand Down

0 comments on commit c28bfd1

Please sign in to comment.