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 218d218
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 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
4 changes: 3 additions & 1 deletion .ci/deploy-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ echo "AVVER=$AVVER" >> ../.ci/ci-vars.env
cd bin
mkdir "rpcs3.app/Contents/lib/"

cp "/usr/local/opt/llvm@16/lib/c++/libc++abi.1.0.dylib" "rpcs3.app/Contents/lib/libc++abi.1.dylib"
if [ "$USE_APPLE_CLANG" != "true" ]; then
cp "/usr/local/opt/llvm@16/lib/c++/libc++abi.1.0.dylib" "rpcs3.app/Contents/lib/libc++abi.1.dylib"
fi

rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
"rpcs3.app/Contents/Frameworks/QtQml.framework" \
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 218d218

Please sign in to comment.