Index: ps/trunk/binaries/data/mods/public/gui/credits/texts/programming.json =================================================================== --- ps/trunk/binaries/data/mods/public/gui/credits/texts/programming.json +++ ps/trunk/binaries/data/mods/public/gui/credits/texts/programming.json @@ -258,6 +258,7 @@ { "nick": "TrinityDeath", "name": "Jethro Lu" }, { "nick": "triumvir", "name": "Corin Schedler" }, { "nick": "trompetin17", "name": "Juan Guillermo" }, + { "nick": "tpearson", "name": "Timothy Pearson" }, { "nick": "user1", "name": "A. C." }, { "nick": "usey11" }, { "nick": "vincent_c", "name": "Vincent Cheng" }, Index: ps/trunk/build/premake/premake5.lua =================================================================== --- ps/trunk/build/premake/premake5.lua +++ ps/trunk/build/premake/premake5.lua @@ -87,6 +87,8 @@ arch = "aarch64" elseif string.find(machine, "e2k") == 1 then arch = "e2k" + elseif string.find(machine, "ppc64") == 1 or string.find(machine, "powerpc64") == 1 then + arch = "ppc64" else print("WARNING: Cannot determine architecture from GCC, assuming x86") end @@ -865,6 +867,8 @@ table.insert(source_dirs, "lib/sysdep/arch/aarch64"); elseif arch == "e2k" then table.insert(source_dirs, "lib/sysdep/arch/e2k"); + elseif arch == "ppc64" then + table.insert(source_dirs, "lib/sysdep/arch/ppc64"); end -- OS-specific Index: ps/trunk/source/lib/alignment.h =================================================================== --- ps/trunk/source/lib/alignment.h +++ ps/trunk/source/lib/alignment.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -80,7 +80,18 @@ // MMU pages // +#ifdef ARCH_PPC64 +// NOTE: ppc64 can operate in either 4k or 64k page size mode +// If the define page size is larger than the active page size, +// the allocator functions normally. If the defined page size +// is less than the active page size, the allocator fails tests. +// +// Define the page size to the maximum known architectural page +// size on ppc64 systems. +static const size_t g_PageSize = 64 * 1024; // 64 KB +#else static const size_t g_PageSize = 4 * 1024; // 4 KB +#endif static const size_t g_LargePageSize = 2 * 1024 * 1024; // 2 MB Index: ps/trunk/source/lib/byte_order.h =================================================================== --- ps/trunk/source/lib/byte_order.h +++ ps/trunk/source/lib/byte_order.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -33,7 +33,7 @@ #ifndef BYTE_ORDER # define LITTLE_ENDIAN 0x4321 # define BIG_ENDIAN 0x1234 -# if ARCH_IA32 || ARCH_IA64 || ARCH_AMD64 || ARCH_ALPHA || ARCH_ARM || ARCH_AARCH64 || ARCH_MIPS || ARCH_E2K || defined(__LITTLE_ENDIAN__) +# if ARCH_IA32 || ARCH_IA64 || ARCH_AMD64 || ARCH_ALPHA || ARCH_ARM || ARCH_AARCH64 || ARCH_MIPS || ARCH_E2K || ARCH_PPC64 || defined(__LITTLE_ENDIAN__) # define BYTE_ORDER LITTLE_ENDIAN # else # define BYTE_ORDER BIG_ENDIAN Index: ps/trunk/source/lib/sysdep/arch.h =================================================================== --- ps/trunk/source/lib/sysdep/arch.h +++ ps/trunk/source/lib/sysdep/arch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -64,6 +64,12 @@ #else # define ARCH_AARCH64 0 #endif +// .. PowerPC64 (PPC64) +#if defined(__powerpc64__) +# define ARCH_PPC64 1 +#else +# define ARCH_PPC64 0 +#endif // .. MIPS #if defined(__MIPS__) || defined(__mips__) || defined(__mips) # define ARCH_MIPS 1 @@ -78,7 +84,7 @@ #endif // ensure exactly one architecture has been detected -#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_MIPS+ARCH_E2K) != 1 +#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_MIPS+ARCH_E2K+ARCH_PPC64) != 1 # error "architecture not correctly detected (either none or multiple ARCH_* defined)" #endif Index: ps/trunk/source/ps/GameSetup/HWDetect.cpp =================================================================== --- ps/trunk/source/ps/GameSetup/HWDetect.cpp +++ ps/trunk/source/ps/GameSetup/HWDetect.cpp @@ -124,6 +124,7 @@ scriptInterface.SetProperty(settings, "arch_arm", ARCH_ARM); scriptInterface.SetProperty(settings, "arch_aarch64", ARCH_AARCH64); scriptInterface.SetProperty(settings, "arch_e2k", ARCH_E2K); + scriptInterface.SetProperty(settings, "arch_ppc64", ARCH_PPC64); #ifdef NDEBUG scriptInterface.SetProperty(settings, "build_debug", 0);