Skip to content

Commit

Permalink
Merge branch 'RPCS3:master' into osx14
Browse files Browse the repository at this point in the history
  • Loading branch information
nastys committed Aug 8, 2023
2 parents 7751b63 + bd7715b commit b36b615
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion .ci/build-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ if [ "$INSTALL_DEPS" = "true" ] ; then
brew install -f --overwrite nasm ninja git p7zip create-dmg ccache pipenv

arch -x86_64 /usr/local/bin/brew -v || arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 /usr/local/bin/brew update
arch -x86_64 /usr/local/bin/brew install -f --overwrite llvm@16 glew cmake sdl2 vulkan-headers ffmpeg
arch -x86_64 /usr/local/bin/brew link -f llvm@16

Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/Cell/PPUAnalyser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ bool ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, const std::b
{
const u32 target = (op.aa ? 0 : iaddr) + (type == ppu_itype::B ? +op.bt24 : +op.bt14);

if (target >= start && target < end && (op.aa && verify_func(iaddr)))
if (target >= start && target < end && (!op.aa || verify_func(iaddr)))
{
if (target < func.addr || target >= func.addr + func.size)
{
Expand Down
8 changes: 2 additions & 6 deletions rpcs3/Emu/Cell/PPUThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1206,9 +1206,7 @@ std::array<u32, 2> op_branch_targets(u32 pc, ppu_opcode_t op)
{
std::array<u32, 2> res{pc + 4, umax};

g_fxo->need<ppu_far_jumps_t>();

if (u32 target = g_fxo->get<ppu_far_jumps_t>().get_target(pc))
if (u32 target = g_fxo->is_init<ppu_far_jumps_t>() ? g_fxo->get<ppu_far_jumps_t>().get_target(pc) : 0)
{
res[0] = target;
return res;
Expand Down Expand Up @@ -3769,9 +3767,7 @@ bool ppu_initialize(const ppu_module& info, bool check_only)
{
for (auto& block : func.blocks)
{
const auto targets = g_fxo->get<ppu_far_jumps_t>().get_targets(block.first, block.second);

if (!targets.empty())
if (g_fxo->is_init<ppu_far_jumps_t>() && !g_fxo->get<ppu_far_jumps_t>().get_targets(block.first, block.second).empty())
{
// Replace the block with ppu_far_jump
continue;
Expand Down
1 change: 0 additions & 1 deletion rpcs3/Loader/ELF.h
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ class elf_object
// Rely on previous sh_offset value!
if (hdr.p_offset <= shdr.sh_offset && shdr.sh_offset + shdr.sh_size - 1 <= hdr.p_offset + hdr.p_filesz - 1)
{
const auto& prog = ::at32(progs, p_index);
out.sh_offset = data_base + shdr.sh_offset - hdr.p_offset;
result = true;
break;
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/util/fixed_typemap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ namespace stx
}

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

0 comments on commit b36b615

Please sign in to comment.