mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 15:31:26 +12:00
Merge branch 'master' into arm64
This commit is contained in:
commit
a409f59aa7
11 changed files with 57 additions and 16 deletions
2
3rdparty/FAudio
vendored
2
3rdparty/FAudio
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 707114aef2907793644d4067a6e7b09b51502ca9
|
Subproject commit af74e661c1bd8b105840d14485cc01d9c782b513
|
4
3rdparty/OpenAL/openal-soft.vcxproj
vendored
4
3rdparty/OpenAL/openal-soft.vcxproj
vendored
|
@ -49,11 +49,11 @@
|
||||||
<PropertyGroup Label="UserMacros">
|
<PropertyGroup Label="UserMacros">
|
||||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||||
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="./Release" -DCMAKE_SYSTEM_VERSION=6.1 -DLIBTYPE=STATIC -DFORCE_STATIC_VCRT=true -DALSOFT_UTILS=false -DALSOFT_EXAMPLES=false -DALSOFT_INSTALL=false -DALSOFT_INSTALL_CONFIG=false -DALSOFT_INSTALL_HRTF_DATA=false -DALSOFT_INSTALL_AMBDEC_PRESETS=false -DALSOFT_INSTALL_EXAMPLES=false -DALSOFT_INSTALL_UTILS=false "$(SolutionDir)3rdparty\OpenAL\openal-soft"
|
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="./Release" -DCMAKE_SYSTEM_VERSION=10.0 -DLIBTYPE=STATIC -DFORCE_STATIC_VCRT=true -DALSOFT_UTILS=false -DALSOFT_EXAMPLES=false -DALSOFT_INSTALL=false -DALSOFT_INSTALL_CONFIG=false -DALSOFT_INSTALL_HRTF_DATA=false -DALSOFT_INSTALL_AMBDEC_PRESETS=false -DALSOFT_INSTALL_EXAMPLES=false -DALSOFT_INSTALL_UTILS=false "$(SolutionDir)3rdparty\OpenAL\openal-soft"
|
||||||
</CmakeReleaseCLI>
|
</CmakeReleaseCLI>
|
||||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||||
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="./Debug" -DCMAKE_SYSTEM_VERSION=6.1 -DLIBTYPE=STATIC -DALSOFT_UTILS=false -DALSOFT_EXAMPLES=false -DALSOFT_INSTALL=false -DALSOFT_INSTALL_CONFIG=false -DALSOFT_INSTALL_HRTF_DATA=false -DALSOFT_INSTALL_AMBDEC_PRESETS=false -DALSOFT_INSTALL_EXAMPLES=false -DALSOFT_INSTALL_UTILS=false "$(SolutionDir)3rdparty\OpenAL\openal-soft"
|
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="./Debug" -DCMAKE_SYSTEM_VERSION=10.0 -DLIBTYPE=STATIC -DALSOFT_UTILS=false -DALSOFT_EXAMPLES=false -DALSOFT_INSTALL=false -DALSOFT_INSTALL_CONFIG=false -DALSOFT_INSTALL_HRTF_DATA=false -DALSOFT_INSTALL_AMBDEC_PRESETS=false -DALSOFT_INSTALL_EXAMPLES=false -DALSOFT_INSTALL_UTILS=false "$(SolutionDir)3rdparty\OpenAL\openal-soft"
|
||||||
</CmakeDebugCLI>
|
</CmakeDebugCLI>
|
||||||
<CmakeCopyCLI>
|
<CmakeCopyCLI>
|
||||||
echo Copying..
|
echo Copying..
|
||||||
|
|
2
3rdparty/fusion/fusion
vendored
2
3rdparty/fusion/fusion
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit fecf2f0af3bd23cbba553ceedc2bc6c1cd410fc1
|
Subproject commit 066d4a63b2c714b20b0a8073a01fda7c5c6763f6
|
2
3rdparty/libpng/libpng
vendored
2
3rdparty/libpng/libpng
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 51f5bd68b9b806d2c92b4318164d28b49357da31
|
Subproject commit 0024abd279d3a06435c0309a3f4172eed7c7a19a
|
2
3rdparty/libsdl-org/SDL
vendored
2
3rdparty/libsdl-org/SDL
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit fa24d868ac2f8fd558e4e914c9863411245db8fd
|
Subproject commit 8236e01a9f758d15927624925c6043f84d8a261f
|
|
@ -636,7 +636,7 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
|
||||||
: m_context(new llvm::LLVMContext)
|
: m_context(new llvm::LLVMContext)
|
||||||
, m_cpu(cpu(_cpu))
|
, m_cpu(cpu(_cpu))
|
||||||
{
|
{
|
||||||
static const bool s_install_llvm_error_handler = []()
|
[[maybe_unused]] static const bool s_install_llvm_error_handler = []()
|
||||||
{
|
{
|
||||||
llvm::remove_fatal_error_handler();
|
llvm::remove_fatal_error_handler();
|
||||||
llvm::install_fatal_error_handler([](void*, const char* msg, bool)
|
llvm::install_fatal_error_handler([](void*, const char* msg, bool)
|
||||||
|
|
|
@ -598,7 +598,10 @@ int aes_setkey_dec( aes_context *ctx, const unsigned char *key, unsigned int key
|
||||||
*RK++ = *SK++;
|
*RK++ = *SK++;
|
||||||
*RK++ = *SK++;
|
*RK++ = *SK++;
|
||||||
|
|
||||||
|
#if defined(__SSE2__) || defined(_M_X64)
|
||||||
done:
|
done:
|
||||||
|
#endif
|
||||||
|
|
||||||
// Wipe the stack buffer clean
|
// Wipe the stack buffer clean
|
||||||
std::fill_n(reinterpret_cast<volatile char*>(&cty), sizeof(cty), 0);
|
std::fill_n(reinterpret_cast<volatile char*>(&cty), sizeof(cty), 0);
|
||||||
|
|
||||||
|
|
|
@ -807,7 +807,7 @@ bool ppu_module<lv2_obj>::analyse(u32 lib_toc, u32 entry, const u32 sec_end, con
|
||||||
ppu_log.trace("OPD: [0x%x] 0x%x (TOC=0x%x)", _ptr, addr, toc);
|
ppu_log.trace("OPD: [0x%x] 0x%x (TOC=0x%x)", _ptr, addr, toc);
|
||||||
|
|
||||||
TOCs.emplace(toc);
|
TOCs.emplace(toc);
|
||||||
auto& func = add_func(addr, addr_heap.count(_ptr.addr()) ? toc : 0, 0);
|
add_func(addr, addr_heap.count(_ptr.addr()) ? toc : 0, 0);
|
||||||
known_functions.emplace(addr);
|
known_functions.emplace(addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4932,7 +4932,7 @@ bool ppu_initialize(const ppu_module<lv2_obj>& info, bool check_only, u64 file_s
|
||||||
|
|
||||||
usz code_size_until_jump = umax;
|
usz code_size_until_jump = umax;
|
||||||
|
|
||||||
auto func = build_function_asm<u8*(*)(ppu_thread&, u64, u8*, u64, u64, u64)>(name, [&](native_asm& c, auto& args)
|
auto func = build_function_asm<u8*(*)(ppu_thread&, u64, u8*, u64, u64, u64)>(name, [&](native_asm& c, auto& /*args*/)
|
||||||
{
|
{
|
||||||
#if defined(ARCH_X64)
|
#if defined(ARCH_X64)
|
||||||
c.mov(x86::edx, func_addr - seg0); // Load PC
|
c.mov(x86::edx, func_addr - seg0); // Load PC
|
||||||
|
|
|
@ -358,8 +358,6 @@ Function* PPUTranslator::GetSymbolResolver(const ppu_module<lv2_obj>& info)
|
||||||
// Create an array of function pointers
|
// Create an array of function pointers
|
||||||
std::vector<llvm::Constant*> functions;
|
std::vector<llvm::Constant*> functions;
|
||||||
|
|
||||||
const auto [min_addr, max_addr] = *ensure(info.jit_bounds);
|
|
||||||
|
|
||||||
for (const auto& f : info.get_funcs(false, true))
|
for (const auto& f : info.get_funcs(false, true))
|
||||||
{
|
{
|
||||||
if (!f.size)
|
if (!f.size)
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
#include "util/asm.hpp"
|
#include "util/asm.hpp"
|
||||||
#include "util/fence.hpp"
|
#include "util/fence.hpp"
|
||||||
|
@ -776,11 +777,6 @@ static const bool s_tsc_freq_evaluated = []() -> bool
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (utils::get_cpu_brand().find("Ryzen") != umax)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
LARGE_INTEGER freq;
|
LARGE_INTEGER freq;
|
||||||
if (!QueryPerformanceFrequency(&freq))
|
if (!QueryPerformanceFrequency(&freq))
|
||||||
|
@ -795,6 +791,50 @@ static const bool s_tsc_freq_evaluated = []() -> bool
|
||||||
|
|
||||||
const ullong timer_freq = freq.QuadPart;
|
const ullong timer_freq = freq.QuadPart;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
// Check if system clocksource is TSC. If the kernel trusts the TSC, we should too.
|
||||||
|
// Some Ryzen laptops have broken firmware when running linux (requires a kernel patch). This is also a problem on some older intel CPUs.
|
||||||
|
const char* clocksource_file = "/sys/devices/system/clocksource/clocksource0/available_clocksource";
|
||||||
|
if (!fs::is_file(clocksource_file))
|
||||||
|
{
|
||||||
|
// OS doesn't support sysfs?
|
||||||
|
printf("[TSC calibration] Could not determine available clock sources. Disabling TSC.\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string clock_sources;
|
||||||
|
std::ifstream file(clocksource_file);
|
||||||
|
std::getline(file, clock_sources);
|
||||||
|
|
||||||
|
if (file.fail())
|
||||||
|
{
|
||||||
|
printf("[TSC calibration] Could not read the available clock sources on this system. Disabling TSC.\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("[TSC calibration] Available clock sources: '%s'\n", clock_sources.c_str());
|
||||||
|
|
||||||
|
// Check if the Kernel has blacklisted the TSC
|
||||||
|
const auto available_clocks = fmt::split(clock_sources, { " " });
|
||||||
|
const bool tsc_reliable = std::find(available_clocks.begin(), available_clocks.end(), "tsc") != available_clocks.end();
|
||||||
|
|
||||||
|
if (!tsc_reliable)
|
||||||
|
{
|
||||||
|
printf("[TSC calibration] TSC is not a supported clock source on this system.\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("[TSC calibration] Kernel reports the TSC is reliable.\n");
|
||||||
|
#else
|
||||||
|
if (utils::get_cpu_brand().find("Ryzen") != umax)
|
||||||
|
{
|
||||||
|
// MacOS is arm-native these days and I don't know much about BSD to fix this if it's an issue. (kd-11)
|
||||||
|
// Having this check only for Ryzen is broken behavior - other CPUs can also have this problem.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
constexpr ullong timer_freq = 1'000'000'000;
|
constexpr ullong timer_freq = 1'000'000'000;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue