Haiku port of duckstation libretro core (#716)

* Haiku build 1st attempt

* fix load on Haiku

* Removed debugging flags

* Added a couple ifndef
This commit is contained in:
kwyxz
2020-08-21 20:20:37 -07:00
committed by GitHub
parent 8151594d60
commit 31695c4ff7
11 changed files with 44 additions and 16 deletions

View File

@ -20,9 +20,11 @@ constexpr bool USE_BLOCK_LINKING = true;
#ifdef WITH_RECOMPILER
static constexpr u32 RECOMPILER_CODE_CACHE_SIZE = 32 * 1024 * 1024;
static constexpr u32 RECOMPILER_FAR_CODE_CACHE_SIZE = 32 * 1024 * 1024;
#ifndef __HAIKU__
static constexpr u32 RECOMPILER_GUARD_SIZE = 4096;
alignas(Recompiler::CODE_STORAGE_ALIGNMENT) static u8
s_code_storage[RECOMPILER_CODE_CACHE_SIZE + RECOMPILER_FAR_CODE_CACHE_SIZE];
#endif
static JitCodeBuffer s_code_buffer;
enum : u32
@ -90,8 +92,12 @@ void Initialize(bool use_recompiler)
#ifdef WITH_RECOMPILER
s_use_recompiler = use_recompiler;
#ifndef __HAIKU__
if (!s_code_buffer.Initialize(s_code_storage, sizeof(s_code_storage), RECOMPILER_FAR_CODE_CACHE_SIZE,
RECOMPILER_GUARD_SIZE))
#else
if (!s_code_buffer.Allocate(RECOMPILER_CODE_CACHE_SIZE, RECOMPILER_FAR_CODE_CACHE_SIZE))
#endif
{
Panic("Failed to initialize code space");
}

View File

@ -80,7 +80,7 @@ constexpr u32 CODE_STORAGE_ALIGNMENT = 4096;
// ABI selection
#if defined(WIN32)
#define ABI_WIN64 1
#elif defined(__linux__) || defined(__ANDROID__) || defined(__APPLE__)
#elif defined(__linux__) || defined(__ANDROID__) || defined(__APPLE__) || defined(__HAIKU__)
#define ABI_SYSV 1
#else
#error Unknown ABI.