Skip to content

Commit 0521750

Browse files
authored
Merge branch 'RPCS3:master' into osx14
2 parents 7751b63 + bd7715b commit 0521750

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

rpcs3/Emu/Cell/PPUAnalyser.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,7 @@ bool ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, const std::b
14631463
{
14641464
const u32 target = (op.aa ? 0 : iaddr) + (type == ppu_itype::B ? +op.bt24 : +op.bt14);
14651465

1466-
if (target >= start && target < end && (op.aa && verify_func(iaddr)))
1466+
if (target >= start && target < end && (!op.aa || verify_func(iaddr)))
14671467
{
14681468
if (target < func.addr || target >= func.addr + func.size)
14691469
{

rpcs3/Emu/Cell/PPUThread.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -1206,9 +1206,7 @@ std::array<u32, 2> op_branch_targets(u32 pc, ppu_opcode_t op)
12061206
{
12071207
std::array<u32, 2> res{pc + 4, umax};
12081208

1209-
g_fxo->need<ppu_far_jumps_t>();
1210-
1211-
if (u32 target = g_fxo->get<ppu_far_jumps_t>().get_target(pc))
1209+
if (u32 target = g_fxo->is_init<ppu_far_jumps_t>() ? g_fxo->get<ppu_far_jumps_t>().get_target(pc) : 0)
12121210
{
12131211
res[0] = target;
12141212
return res;
@@ -3769,9 +3767,7 @@ bool ppu_initialize(const ppu_module& info, bool check_only)
37693767
{
37703768
for (auto& block : func.blocks)
37713769
{
3772-
const auto targets = g_fxo->get<ppu_far_jumps_t>().get_targets(block.first, block.second);
3773-
3774-
if (!targets.empty())
3770+
if (g_fxo->is_init<ppu_far_jumps_t>() && !g_fxo->get<ppu_far_jumps_t>().get_targets(block.first, block.second).empty())
37753771
{
37763772
// Replace the block with ppu_far_jump
37773773
continue;

rpcs3/Loader/ELF.h

-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,6 @@ class elf_object
456456
// Rely on previous sh_offset value!
457457
if (hdr.p_offset <= shdr.sh_offset && shdr.sh_offset + shdr.sh_size - 1 <= hdr.p_offset + hdr.p_filesz - 1)
458458
{
459-
const auto& prog = ::at32(progs, p_index);
460459
out.sh_offset = data_base + shdr.sh_offset - hdr.p_offset;
461460
result = true;
462461
break;

rpcs3/util/fixed_typemap.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ namespace stx
347347
}
348348

349349
// Check if object is not initialized but shall be initialized first (to use in initializing other objects)
350-
template <typename T>
350+
template <typename T> requires (std::is_constructible_v<T, manual_typemap&> || std::is_default_constructible_v<T>)
351351
void need() noexcept
352352
{
353353
if (!m_init[stx::typeindex<typeinfo, std::decay_t<T>>()])

0 commit comments

Comments
 (0)