mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
macos: fix build for arm64
Adds arm64 branches to some x86 specific code and modifies some casting logic to make Clang happy
This commit is contained in:
parent
219ddf3e11
commit
e761b3235c
2
3rdparty/llvm.cmake
vendored
2
3rdparty/llvm.cmake
vendored
@ -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")
|
||||
|
@ -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_ */
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user