Update memmap.c, also include DJGPP as excluded.

This commit is contained in:
Stephanie Gawroriski
2024-06-25 13:21:36 -04:00
parent 84e6732fe9
commit 013f6e321a
3 changed files with 21 additions and 9 deletions

View File

@@ -17,15 +17,26 @@ message("that you are resting well.")
message(" -- Your friend, Stephanie")
message("******************************")
# Is this x86_32?
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_32" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i386" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i486" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i586" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ia32")
set(MU_IS_X86_32 YES)
endif()
# Some platforms cannot use FPIC code
if(PLATFORM_PSP OR PSP)
if(DJGPP OR PLATFORM_PSP OR PSP)
set(MU_FPIC OFF)
else()
set(MU_FPIC ON)
endif()
# Do not include experimental ARM core for some platforms
if(DJGPP OR PLATFORM_PSP OR PSP)
if(DJGPP OR PLATFORM_PSP OR PSP OR (APPLE AND MU_IS_X86_32))
set(MU_ARM OFF)
else()
set(MU_ARM ON)

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 2010-2018 The RetroArch team
/* Copyright (C) 2010-2020 The RetroArch team
*
* ---------------------------------------------------------------------------------------
* The following license statement only applies to this file (memmap.h).
@@ -26,7 +26,7 @@
#include <stdio.h>
#include <stdint.h>
#if defined(__PS3__) || defined(PSP) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH)
#if defined(PSP) || defined(PS2) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH) || defined(HAVE_LIBNX) || defined(__PS3__) || defined(__PSL1GHT__) || defined(DJGPP)
/* No mman available */
#elif defined(_WIN32) && !defined(_XBOX)
#include <windows.h>
@@ -49,4 +49,4 @@ int memsync(void *start, void *end);
int memprotect(void *addr, size_t len);
#endif
#endif

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 2010-2018 The RetroArch team
/* Copyright (C) 2010-2020 The RetroArch team
*
* ---------------------------------------------------------------------------------------
* The following license statement only applies to this file (memmap.c).
@@ -21,6 +21,7 @@
*/
#include <stdint.h>
#include <stdlib.h>
#include <memmap.h>
#ifndef PROT_READ
@@ -130,14 +131,14 @@ int mprotect(void *addr, size_t len, int prot)
#endif
#if defined(__MACH__) && defined(__arm__)
#if defined(__MACH__) && (defined(__arm__) || defined(__arm64__))
#include <libkern/OSCacheControl.h>
#endif
int memsync(void *start, void *end)
{
size_t len = (char*)end - (char*)start;
#if defined(__MACH__) && defined(__arm__)
#if defined(__MACH__) && (defined(__arm__) || defined(__arm64__))
sys_dcache_flush(start ,len);
sys_icache_invalidate(start, len);
return 0;
@@ -160,4 +161,4 @@ int memsync(void *start, void *end)
int memprotect(void *addr, size_t len)
{
return mprotect(addr, len, PROT_READ | PROT_WRITE | PROT_EXEC);
}
}