diff --git a/3rdparty/llvm.cmake b/3rdparty/llvm.cmake index 9b6f677484..9a8d3b0745 100644 --- a/3rdparty/llvm.cmake +++ b/3rdparty/llvm.cmake @@ -70,7 +70,7 @@ if(WITH_LLVM) endif() if(COMPILER_ARM) - set(LLVM_LIBS ${LLVM_LIBS} LLVMX86CodeGen LLVMX86AsmParser LLVMARMCodeGen LLVMARMAsmParser LLVMAArch64CodeGen LLVMAArch64AsmParser) + set(LLVM_LIBS ${LLVM_LIBS} LLVMX86CodeGen LLVMX86AsmParser LLVMAArch64CodeGen LLVMAArch64AsmParser) endif() if(WIN32 OR CMAKE_SYSTEM MATCHES "Linux") diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 8690f67606..a731e34a86 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1222,7 +1222,12 @@ usz get_x64_access_size(x64_context* context, x64_op_t op, x64_reg_t reg, usz d_ #elif defined(ARCH_ARM64) +#if defined(__APPLE__) +// https://github.com/bombela/backward-cpp/issues/200 +#define RIP(context) ((context)->uc_mcontext->__ss.__pc) +#else #define RIP(context) ((context)->uc_mcontext.pc) +#endif #endif /* ARCH_ */ diff --git a/rpcs3/Emu/CPU/sse2neon.h b/rpcs3/Emu/CPU/sse2neon.h index 215b7e4dde..d863c0ca73 100644 --- a/rpcs3/Emu/CPU/sse2neon.h +++ b/rpcs3/Emu/CPU/sse2neon.h @@ -48,6 +48,12 @@ * SOFTWARE. */ +// Suppress old-style casts in this file on Clang ARM64 +#if defined(__clang__) && defined(ARCH_ARM64) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wold-style-cast" +#endif + /* Tunable configurations */ /* Enable precise implementation of math operations @@ -8774,3 +8780,7 @@ FORCE_INLINE void _sse2neon_mm_set_denormals_zero_mode(unsigned int flag) #endif #endif + +#if defined(__clang__) && defined(ARCH_ARM64) +#pragma clang diagnostic pop +#endif diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index 40a12905e4..485e871c74 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -1514,7 +1514,7 @@ bool VKGSRender::release_GCM_label(u32 address, u32 args) { while (m_host_data_ptr->last_label_release_event > m_host_data_ptr->commands_complete_event) { - _mm_pause(); + utils::pause(); if (thread_ctrl::state() == thread_state::aborting) { diff --git a/rpcs3/util/media_utils.cpp b/rpcs3/util/media_utils.cpp index 725659c3b5..97a6abc8a2 100644 --- a/rpcs3/util/media_utils.cpp +++ b/rpcs3/util/media_utils.cpp @@ -166,7 +166,7 @@ namespace utils struct scoped_av { AVFormatContext* format = nullptr; - AVCodec* codec = nullptr; + const AVCodec* codec = nullptr; AVCodecContext* context = nullptr; AVFrame* frame = nullptr; SwrContext* swr = nullptr; @@ -180,8 +180,8 @@ namespace utils swr_free(&swr); if (context) avcodec_close(context); - if (codec) - av_free(codec); + // AVCodec is managed by libavformat, no need to free it + // see: https://stackoverflow.com/a/18047320 if (format) avformat_free_context(format); }