From 68911395974f554e231da2c359d421dfdc853df5 Mon Sep 17 00:00:00 2001 From: Jonian Guveli Date: Sat, 22 Jun 2024 10:52:13 +0300 Subject: [PATCH 1/2] parallel rsp support for defining pagesize at build time --- mupen64plus-rsp-paraLLEl/jit_allocator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mupen64plus-rsp-paraLLEl/jit_allocator.cpp b/mupen64plus-rsp-paraLLEl/jit_allocator.cpp index 4207fabf2..4591ff7f9 100644 --- a/mupen64plus-rsp-paraLLEl/jit_allocator.cpp +++ b/mupen64plus-rsp-paraLLEl/jit_allocator.cpp @@ -38,6 +38,8 @@ static size_t align_page(size_t offset) { #if defined(__APPLE__) && defined(__aarch64__) size_t pagesize = sysconf(_SC_PAGESIZE) - 1; +#elif defined(PAGESIZE) + size_t pagesize = PAGESIZE - 1; #else size_t pagesize = 4095; #endif From 3fd6e6bda7e8b5a7c5ffb1498419006179abf9e4 Mon Sep 17 00:00:00 2001 From: Jonian Guveli Date: Sat, 22 Jun 2024 11:13:51 +0300 Subject: [PATCH 2/2] linux: get page size at build time fixes RPi 5 16 KB page size, not working if cross-compiling --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 3a6388549..e9c572973 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,10 @@ ifeq (,$(ARCH)) ARCH = $(shell uname -m) endif +ifeq ($(shell uname -m),aarch64) + CPUFLAGS += -DPAGESIZE=$(or $(shell getconf PAGESIZE),4096) +endif + # Target Dynarec WITH_DYNAREC ?= $(ARCH)