From 5ff2383af7de1c7d7963732ccb9414c92add4e84 Mon Sep 17 00:00:00 2001 From: byuu <2107894+byuu@users.noreply.github.com> Date: Fri, 19 Jul 2019 00:39:19 +0900 Subject: [PATCH] v106.181 * SFC: fixed PPU WIP regression with sprites in Donkey Kong Country 2 * libco: fix ELFv2 PowerPC compilation * hiro: fix Cocoa compilation * other: miscellaneous code cleanups --- aarch64.c | 2 +- libco.c | 2 +- ppc.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/aarch64.c b/aarch64.c index 3b00c526..e153cd46 100644 --- a/aarch64.c +++ b/aarch64.c @@ -21,7 +21,7 @@ static void (*co_swap)(cothread_t, cothread_t) = 0; #else section(text) #endif -static const uint32_t co_swap_functin[1024] = { +static const uint32_t co_swap_function[1024] = { 0xa9002428, /* stp x8,x9,[x1] */ 0xa9012c2a, /* stp x10,x11,[x1,#16] */ 0xa902342c, /* stp x12,x13,[x1,#32] */ diff --git a/libco.c b/libco.c index b0f018e9..de11fbe9 100644 --- a/libco.c +++ b/libco.c @@ -15,7 +15,7 @@ #include "arm.c" #elif defined(__aarch64__) #include "aarch64.c" - #elif defined(_ARCH_PPC) + #elif defined(_ARCH_PPC) && !defined(__LITTLE_ENDIAN__) #include "ppc.c" #elif defined(_WIN32) #include "fiber.c" diff --git a/ppc.c b/ppc.c index f071fab2..969fcec2 100644 --- a/ppc.c +++ b/ppc.c @@ -1,3 +1,5 @@ +/* ppc64le (ELFv2) is not currently supported */ + #define LIBCO_C #include "libco.h" #include "settings.h" @@ -36,7 +38,7 @@ static thread_local cothread_t co_active_handle = 0; /* whether function calls are indirect through a descriptor, or are directly to function */ #ifndef LIBCO_PPCDESC - #if !_CALL_SYSV && (_CALL_AIX || _CALL_AIXDESC || LIBCO_PPC64) + #if !_CALL_SYSV && (_CALL_AIX || _CALL_AIXDESC || (LIBCO_PPC64 && (!defined(_CALL_ELF) || _CALL_ELF == 1))) #define LIBCO_PPCDESC 1 #endif #endif