mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-19 03:39:54 +00:00
Address review comments
This commit is contained in:
parent
fa7e0e4758
commit
1200bbe7cc
@ -21,21 +21,6 @@ LOG_CHANNEL(jit_log, "JIT");
|
|||||||
|
|
||||||
namespace aarch64
|
namespace aarch64
|
||||||
{
|
{
|
||||||
// FIXME: This really should be part of fmt
|
|
||||||
static std::string join_strings(const std::vector<std::string>& v, const char* delim)
|
|
||||||
{
|
|
||||||
std::string result;
|
|
||||||
for (const auto& s : v)
|
|
||||||
{
|
|
||||||
if (!result.empty())
|
|
||||||
{
|
|
||||||
result += delim;
|
|
||||||
}
|
|
||||||
result += s;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
using instruction_info_t = GHC_frame_preservation_pass::instruction_info_t;
|
using instruction_info_t = GHC_frame_preservation_pass::instruction_info_t;
|
||||||
using function_info_t = GHC_frame_preservation_pass::function_info_t;
|
using function_info_t = GHC_frame_preservation_pass::function_info_t;
|
||||||
|
|
||||||
@ -414,7 +399,7 @@ namespace aarch64
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Emit the branch
|
// Emit the branch
|
||||||
llvm_asm(irb, exit_fn, args, join_strings(constraints, ","), f.getContext());
|
llvm_asm(irb, exit_fn, args, fmt::merge(constraints, ","), f.getContext());
|
||||||
|
|
||||||
// Delete original call instruction
|
// Delete original call instruction
|
||||||
bit = ci->eraseFromParent();
|
bit = ci->eraseFromParent();
|
||||||
|
@ -4,6 +4,18 @@
|
|||||||
|
|
||||||
namespace rpcs3
|
namespace rpcs3
|
||||||
{
|
{
|
||||||
|
#if defined(ARCH_x64)
|
||||||
|
union hypervisor_context_t
|
||||||
|
{
|
||||||
|
u64 regs[1];
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
u64 rsp;
|
||||||
|
} x86;
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(sizeof(hypervisor_context_t) == 8);
|
||||||
|
#else
|
||||||
union alignas(16) hypervisor_context_t
|
union alignas(16) hypervisor_context_t
|
||||||
{
|
{
|
||||||
u64 regs[16];
|
u64 regs[16];
|
||||||
@ -29,12 +41,6 @@ namespace rpcs3
|
|||||||
|
|
||||||
// x0-x17 unused
|
// x0-x17 unused
|
||||||
} aarch64;
|
} aarch64;
|
||||||
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
u64 sp;
|
|
||||||
|
|
||||||
// Other regs unused
|
|
||||||
} x86;
|
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -3548,7 +3548,7 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
|
|||||||
|
|
||||||
if (notify)
|
if (notify)
|
||||||
{
|
{
|
||||||
bool notified = false;
|
bool notified = false;
|
||||||
|
|
||||||
if (ppu.res_notify_time == (vm::reservation_acquire(notify) & -128))
|
if (ppu.res_notify_time == (vm::reservation_acquire(notify) & -128))
|
||||||
{
|
{
|
||||||
|
@ -164,9 +164,6 @@ public:
|
|||||||
|
|
||||||
using cpu_thread::operator=;
|
using cpu_thread::operator=;
|
||||||
|
|
||||||
// Hypervisor context data
|
|
||||||
alignas(16) rpcs3::hypervisor_context_t hv_ctx; // HV context for gate enter exit. Keep at a low struct offset.
|
|
||||||
|
|
||||||
u64 gpr[32] = {}; // General-Purpose Registers
|
u64 gpr[32] = {}; // General-Purpose Registers
|
||||||
f64 fpr[32] = {}; // Floating Point Registers
|
f64 fpr[32] = {}; // Floating Point Registers
|
||||||
v128 vr[32] = {}; // Vector Registers
|
v128 vr[32] = {}; // Vector Registers
|
||||||
@ -307,7 +304,8 @@ public:
|
|||||||
// Thread name
|
// Thread name
|
||||||
atomic_ptr<std::string> ppu_tname;
|
atomic_ptr<std::string> ppu_tname;
|
||||||
|
|
||||||
u64 saved_native_sp = 0; // Host thread's stack pointer for emulated longjmp
|
// Hypervisor context data
|
||||||
|
rpcs3::hypervisor_context_t hv_ctx; // HV context for gate enter exit. Keep at a low struct offset.
|
||||||
|
|
||||||
u64 last_ftsc = 0;
|
u64 last_ftsc = 0;
|
||||||
u64 last_ftime = 0;
|
u64 last_ftime = 0;
|
||||||
|
@ -779,7 +779,7 @@ public:
|
|||||||
u64 block_recover = 0;
|
u64 block_recover = 0;
|
||||||
u64 block_failure = 0;
|
u64 block_failure = 0;
|
||||||
|
|
||||||
alignas(16) rpcs3::hypervisor_context_t hv_ctx; // NOTE: The offset within the class must be within the first 1MiB
|
rpcs3::hypervisor_context_t hv_ctx; // NOTE: The offset within the class must be within the first 1MiB
|
||||||
|
|
||||||
u64 ftx = 0; // Failed transactions
|
u64 ftx = 0; // Failed transactions
|
||||||
u64 stx = 0; // Succeeded transactions (pure counters)
|
u64 stx = 0; // Succeeded transactions (pure counters)
|
||||||
|
@ -536,6 +536,7 @@
|
|||||||
<ClInclude Include="Emu\Cell\Modules\libfs_utility_init.h" />
|
<ClInclude Include="Emu\Cell\Modules\libfs_utility_init.h" />
|
||||||
<ClInclude Include="Emu\Cell\Modules\sys_crashdump.h" />
|
<ClInclude Include="Emu\Cell\Modules\sys_crashdump.h" />
|
||||||
<ClInclude Include="Emu\config_mode.h" />
|
<ClInclude Include="Emu\config_mode.h" />
|
||||||
|
<ClInclude Include="Emu\CPU\Hypervisor.h" />
|
||||||
<ClInclude Include="Emu\CPU\sse2neon.h" />
|
<ClInclude Include="Emu\CPU\sse2neon.h" />
|
||||||
<ClInclude Include="Emu\games_config.h" />
|
<ClInclude Include="Emu\games_config.h" />
|
||||||
<ClInclude Include="Emu\Io\Buzz.h" />
|
<ClInclude Include="Emu\Io\Buzz.h" />
|
||||||
|
@ -2569,8 +2569,8 @@
|
|||||||
<ClInclude Include="Emu\RSX\NV47\FW\GRAPH_backend.h">
|
<ClInclude Include="Emu\RSX\NV47\FW\GRAPH_backend.h">
|
||||||
<Filter>Emu\GPU\RSX\NV47\FW</Filter>
|
<Filter>Emu\GPU\RSX\NV47\FW</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Emu\Io\mouse_config.h">
|
<ClInclude Include="Emu\CPU\Hypervisor.h">
|
||||||
<Filter>Emu\Io</Filter>
|
<Filter>Emu\CPU</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user