From 44245ef0ea1b8a30f3c9d6fbfc278083172785b5 Mon Sep 17 00:00:00 2001 From: kub Date: Mon, 12 Apr 2021 20:02:11 +0200 Subject: [PATCH] libretro, build fix for ngc/wii/wiiu --- cpu/sh2/compiler.c | 5 +++-- platform/libretro/libretro.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cpu/sh2/compiler.c b/cpu/sh2/compiler.c index 8085bfcc..8a46f431 100644 --- a/cpu/sh2/compiler.c +++ b/cpu/sh2/compiler.c @@ -468,7 +468,7 @@ static void rcache_free_tmp(int hr); #include "../drc/emit_mips.c" #elif defined(__riscv__) || defined(__riscv) #include "../drc/emit_riscv.c" -#elif defined(__powerpc__) || defined(_M_PPC) +#elif defined(__powerpc__) || defined(__ppc__) || defined(_M_PPC) #include "../drc/emit_ppc.c" #elif defined(__i386__) || defined(_M_X86) #include "../drc/emit_x86.c" @@ -3014,7 +3014,8 @@ static void emit_do_static_regs(int is_write, int tmpr) // divide operation replacement functions, called by compiled code. Only the // 32:16 cases and the 64:32 cases described in the SH2 prog man are replaced. -// This is surprisingly difficult since the SH2 division operation is generating// the result in the dividend during the operation, leaving some remainder-like +// This is surprisingly difficult since the SH2 division operation is generating +// the result in the dividend during the operation, leaving some remainder-like // stuff in the bits unused for the result, and leaving the T and Q status bits // in a state depending on the operands and the result. Q always reflects the // last result bit generated (i.e. bit 0 of the result). For T: diff --git a/platform/libretro/libretro.c b/platform/libretro/libretro.c index 25ae8437..593f4ce5 100644 --- a/platform/libretro/libretro.c +++ b/platform/libretro/libretro.c @@ -16,9 +16,9 @@ #include #ifndef _WIN32 #ifndef NO_MMAP -#ifdef __SWITCH__ +#if defined __SWITCH__ #include "switch/mman.h" -#else +#elif ! defined NO_MMAP #include #endif #endif -- 2.39.2