diff --git a/Common/CPUDetect.cpp b/Common/CPUDetect.cpp index 057a89239097..2cbe99b4cff8 100644 --- a/Common/CPUDetect.cpp +++ b/Common/CPUDetect.cpp @@ -542,3 +542,31 @@ std::string CPUInfo::Summarize() { } #endif // PPSSPP_ARCH(X86) || PPSSPP_ARCH(AMD64) + +const char *GetCompilerABI() { +#if PPSSPP_ARCH(ARMV7) + return "armeabi-v7a"; +#elif PPSSPP_ARCH(ARM) + return "armeabi"; +#elif PPSSPP_ARCH(ARM64) + return "arm64"; +#elif PPSSPP_ARCH(X86) + return "x86"; +#elif PPSSPP_ARCH(AMD64) + return "x86-64"; +#elif PPSSPP_ARCH(RISCV64) + //https://github.com/riscv/riscv-toolchain-conventions#cc-preprocessor-definitions + //https://github.com/riscv/riscv-c-api-doc/blob/master/riscv-c-api.md#abi-related-preprocessor-definitions + #if defined(__riscv_float_abi_single) + return "lp64f"; + #elif defined(__riscv_float_abi_double) + return "lp64d"; + #elif defined(__riscv_float_abi_quad) + return "lp64q"; + #elif defined(__riscv_float_abi_soft) + return "lp64"; + #endif +#else + return "other"; +#endif +} diff --git a/Common/CPUDetect.h b/Common/CPUDetect.h index e4f0a567a401..20bb523415fa 100644 --- a/Common/CPUDetect.h +++ b/Common/CPUDetect.h @@ -161,3 +161,5 @@ struct CPUInfo { }; extern CPUInfo cpu_info; + +const char *GetCompilerABI(); diff --git a/Core/MIPS/ARM64/Arm64CompVFPU.cpp b/Core/MIPS/ARM64/Arm64CompVFPU.cpp index d5dd416d6f52..0d84f2851d51 100644 --- a/Core/MIPS/ARM64/Arm64CompVFPU.cpp +++ b/Core/MIPS/ARM64/Arm64CompVFPU.cpp @@ -948,6 +948,12 @@ namespace MIPSComp { } void Arm64Jit::Comp_Vh2f(MIPSOpcode op) { + // TODO: Fix by porting the general SSE solution to NEON + // FCVTL doesn't provide identical results to the PSP hardware, according to the unit test: + // O vh2f: 00000000,400c0000,00000000,7ff00000 + // E vh2f: 00000000,400c0000,00000000,7f800380 + DISABLE; + CONDITIONAL_DISABLE(VFPU_VEC); if (js.HasUnknownPrefix()) { DISABLE; diff --git a/UI/DebugOverlay.cpp b/UI/DebugOverlay.cpp index 6a54cc882b56..9e402144ac12 100644 --- a/UI/DebugOverlay.cpp +++ b/UI/DebugOverlay.cpp @@ -2,6 +2,7 @@ #include "Common/GPU/thin3d.h" #include "Common/System/System.h" #include "Common/Data/Text/I18n.h" +#include "Common/CPUDetect.h" #include "Core/MIPS/MIPS.h" #include "Core/HW/Display.h" #include "Core/FrameTiming.h" diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index 3c5aea442b02..0d614b61ff91 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -452,34 +452,6 @@ UI::EventReturn JitDebugScreen::OnDisableAll(UI::EventParams &e) { return UI::EVENT_DONE; } -const char *GetCompilerABI() { -#if PPSSPP_ARCH(ARMV7) - return "armeabi-v7a"; -#elif PPSSPP_ARCH(ARM) - return "armeabi"; -#elif PPSSPP_ARCH(ARM64) - return "arm64"; -#elif PPSSPP_ARCH(X86) - return "x86"; -#elif PPSSPP_ARCH(AMD64) - return "x86-64"; -#elif PPSSPP_ARCH(RISCV64) - //https://github.com/riscv/riscv-toolchain-conventions#cc-preprocessor-definitions - //https://github.com/riscv/riscv-c-api-doc/blob/master/riscv-c-api.md#abi-related-preprocessor-definitions - #if defined(__riscv_float_abi_single) - return "lp64f"; - #elif defined(__riscv_float_abi_double) - return "lp64d"; - #elif defined(__riscv_float_abi_quad) - return "lp64q"; - #elif defined(__riscv_float_abi_soft) - return "lp64"; - #endif -#else - return "other"; -#endif -} - void SystemInfoScreen::update() { TabbedUIDialogScreenWithGameBackground::update(); g_OSD.NudgeSidebar(); diff --git a/UI/DevScreens.h b/UI/DevScreens.h index 0321aab1a3e3..29fbf5690b7d 100644 --- a/UI/DevScreens.h +++ b/UI/DevScreens.h @@ -264,6 +264,5 @@ class TouchTestScreen : public UIDialogScreenWithGameBackground { }; void DrawProfile(UIContext &ui); -const char *GetCompilerABI(); void AddOverlayList(UI::ViewGroup *items, ScreenManager *screenManager); diff --git a/headless/headless.txt b/headless/headless.txt index ddc43e4cfc0d..194a14ca98fc 100644 --- a/headless/headless.txt +++ b/headless/headless.txt @@ -1,7 +1,6 @@ -Plan: +TODO: This documentation is outdated and needs updating. - -This is intended to be a port that does not have graphics, it just starts up the system without a display, prints all debug output (as configured) to the console using printf(), and exits when the emulated binary exits. +This is a build of PPSSPP that does not have graphics, it just starts up the system without a display, prints all debug output (as configured) to the console using printf(), and exits when the emulated binary exits. Usage: diff --git a/test.py b/test.py index 7b55c8a692ac..a992913b9c98 100755 --- a/test.py +++ b/test.py @@ -196,7 +196,7 @@ def target(): "gpu/transfer/overlap", "gpu/vertices/colors", "gpu/vertices/morph", - "gpu/vertices/texcoords", + # "gpu/vertices/texcoords", # See issue #19093 "hash/hash", "hle/check_not_used_uids", "intr/intr", diff --git a/unittest/JitHarness.cpp b/unittest/JitHarness.cpp index 71dd8f92c5b2..cf21c5962382 100644 --- a/unittest/JitHarness.cpp +++ b/unittest/JitHarness.cpp @@ -197,8 +197,10 @@ bool TestJit() { ir_speed = ExecCPUTest(); mipsr4k.UpdateCore(CPUCore::JIT); jit_speed = ExecCPUTest(); +#if !PPSSPP_PLATFORM(MAC) mipsr4k.UpdateCore(CPUCore::JIT_IR); jit_ir_speed = ExecCPUTest(false); +#endif // Disassemble JitBlockCacheDebugInterface *cache = MIPSComp::jit->GetBlockCacheDebugInterface(); diff --git a/unittest/TestArm64Emitter.cpp b/unittest/TestArm64Emitter.cpp index a795cfbb2f1f..66d373f16b4c 100644 --- a/unittest/TestArm64Emitter.cpp +++ b/unittest/TestArm64Emitter.cpp @@ -282,7 +282,7 @@ bool TestArm64Emitter() { emitter.EORI2R(X1, X3, 0x3F0000003F0, INVALID_REG); RET(CheckLast(emitter, "d21c1461 eor x1, x3, #0x3f0000003f0")); - printf("yay!\n"); + printf("ARM64 emitter test completed!\n"); //emitter.ANDI2R(W1, W3, 0xFF00FF00FF00FF00ULL, INVALID_REG); //RET(CheckLast(emitter, "00000000 and x1, x3, 0xFF00FF00FF00FF00")); diff --git a/unittest/TestSoftwareGPUJit.cpp b/unittest/TestSoftwareGPUJit.cpp index 5d7c6946d410..ab2f5ff73cbf 100644 --- a/unittest/TestSoftwareGPUJit.cpp +++ b/unittest/TestSoftwareGPUJit.cpp @@ -24,6 +24,7 @@ #include "GPU/Software/SoftGpu.h" static bool TestSamplerJit() { +#if PPSSPP_ARCH(AMD64) using namespace Sampler; SamplerJitCache *cache = new SamplerJitCache(); BinManager binner; @@ -108,9 +109,14 @@ static bool TestSamplerJit() { delete cache; return successes == count && !HitAnyAsserts(); +#else + // Don't test sampler jit, not supported. + return true; +#endif } static bool TestPixelJit() { +#if PPSSPP_ARCH(AMD64) using namespace Rasterizer; PixelJitCache *cache = new PixelJitCache(); BinManager binner; @@ -159,6 +165,10 @@ static bool TestPixelJit() { delete [] zb_data; delete cache; return successes == count && !HitAnyAsserts(); +#else + // Not yet supported + return true; +#endif } bool TestSoftwareGPUJit() { diff --git a/unittest/UnitTest.cpp b/unittest/UnitTest.cpp index c71a19bf4b8c..0fa08b8ed805 100644 --- a/unittest/UnitTest.cpp +++ b/unittest/UnitTest.cpp @@ -1061,6 +1061,10 @@ TestItem availableTests[] = { int main(int argc, const char *argv[]) { SetCurrentThreadName("UnitTest"); + printf("CPU name: %s\n", cpu_info.cpu_string); + printf("ABI: %s\n", GetCompilerABI()); + + // In case we're on ARM, assume these are available. cpu_info.bNEON = true; cpu_info.bVFP = true; cpu_info.bVFPv3 = true; @@ -1096,10 +1100,11 @@ int main(int argc, const char *argv[]) { printf("%d tests passed.\n", passes); } if (fails > 0) { + printf("%d tests failed!\n", fails); return 2; } } else if (testFunc == nullptr) { - fprintf(stderr, "You may select a test to run by passing an argument.\n"); + fprintf(stderr, "You may select a test to run by passing an argument, either \"all\" or one or more of the below.\n"); fprintf(stderr, "\n"); fprintf(stderr, "Available tests:\n"); for (auto f : availableTests) {