Commit 3a67e07c authored by Libretro-Admin's avatar Libretro-Admin
Browse files

More buildfixes - use retro_inline.h from libretro-common

libretro.c needs to use compat/posix_string.h now for
backwards-compat and portable strcasecmp impl.
parent 01038763
Pipeline #64784 failed with stages
in 1 minute and 31 seconds
......@@ -280,7 +280,7 @@ else ifeq ($(platform), libnx)
CFLAGS += -O3 -fomit-frame-pointer -ffast-math -I$(DEVKITPRO)/libnx/include/ -fPIE -Wl,--allow-multiple-definition
CFLAGS += -specs=$(DEVKITPRO)/libnx/switch.specs
CFLAGS += -D__SWITCH__ -DHAVE_LIBNX
CFLAGS += -DARM -D__aarch64__=1 -march=armv8-a -mtune=cortex-a57 -mtp=soft -DINLINE=inline -ffast-math -mcpu=cortex-a57+crc+fp+simd -ffunction-sections
CFLAGS += -DARM -D__aarch64__=1 -march=armv8-a -mtune=cortex-a57 -mtp=soft -ffast-math -mcpu=cortex-a57+crc+fp+simd -ffunction-sections
CFLAGS += -Ifrontend/switch -ftree-vectorize
STATIC_LINKING=1
......
......@@ -376,10 +376,4 @@ case DAA:
break;
default:
if(R->TrapBadOps)
printf
(
"[Z80 %lX] Unrecognized instruction: %02X at PC=%04X\n",
(long)R->User,OpZ80(R->PC.W-1),R->PC.W-1
);
break;
......@@ -15,17 +15,7 @@
#include "Z80.h"
#include "Tables.h"
#include <stdio.h>
/** INLINE ***************************************************/
/** C99 standard has "inline", but older compilers used **/
/** __inline for the same purpose. **/
/*************************************************************/
#ifdef __C99__
#define INLINE static inline
#else
#define INLINE static __inline
#endif
#include <retro_inline.h>
/** System-Dependent Stuff ***********************************/
/** This is system-dependent code put here to speed things **/
......@@ -34,7 +24,7 @@
#ifdef COLEM
#define FAST_RDOP
extern byte *ROMPage[];
INLINE byte OpZ80(word A) { return(ROMPage[A>>13][A&0x1FFF]); }
static INLINE byte OpZ80(word A) { return(ROMPage[A>>13][A&0x1FFF]); }
#endif
#ifdef SPECCY
......@@ -42,20 +32,20 @@ INLINE byte OpZ80(word A) { return(ROMPage[A>>13][A&0x1FFF]); }
// @@@ WrZ80() can't be inlined as it contains debugging stuff
//#define WrZ80 WRZ80
extern byte *Page[],*ROM;
INLINE byte RdZ80(word A) { return(Page[A>>13][A&0x1FFF]); }
//INLINE void WrZ80(word A,byte V) { if(Page[A>>13]<ROM) Page[A>>13][A&0x1FFF]=V; }
static INLINE byte RdZ80(word A) { return(Page[A>>13][A&0x1FFF]); }
//static INLINE void WrZ80(word A,byte V) { if(Page[A>>13]<ROM) Page[A>>13][A&0x1FFF]=V; }
#endif
#ifdef MG
#define RdZ80 RDZ80
extern byte *Page[];
INLINE byte RdZ80(word A) { return(Page[A>>13][A&0x1FFF]); }
static INLINE byte RdZ80(word A) { return(Page[A>>13][A&0x1FFF]); }
#endif
#ifdef FMSX
#define FAST_RDOP
extern byte *RAM[];
INLINE byte OpZ80(word A) { return(RAM[A>>13][A&0x1FFF]); }
static INLINE byte OpZ80(word A) { return(RAM[A>>13][A&0x1FFF]); }
#endif
#ifdef ATI85
......@@ -63,8 +53,8 @@ INLINE byte OpZ80(word A) { return(RAM[A>>13][A&0x1FFF]); }
#define WrZ80 WRZ80
extern byte *Page[],*ROM;
extern void (*DoMEM)(word Addr,byte V);
INLINE byte RdZ80(word A) { return(Page[A>>14][A&0x3FFF]); }
INLINE void WrZ80(word A,byte V) { if(Page[A>>14]<ROM) Page[A>>14][A&0x3FFF]=V; else DoMEM(A,V); }
static INLINE byte RdZ80(word A) { return(Page[A>>14][A&0x3FFF]); }
static INLINE void WrZ80(word A,byte V) { if(Page[A>>14]<ROM) Page[A>>14][A&0x3FFF]=V; else DoMEM(A,V); }
#endif
/** FAST_RDOP ************************************************/
......@@ -353,12 +343,7 @@ static void CodesCB(Z80 *R)
{
#include "CodesCB.h"
default:
if(R->TrapBadOps)
printf
(
"[Z80 %lX] Unrecognized instruction: CB %02X at PC=%04X\n",
(long)(R->User),OpZ80(R->PC.W-1),R->PC.W-2
);
break;
}
}
......@@ -377,12 +362,7 @@ static void CodesDDCB(Z80 *R)
{
#include "CodesXCB.h"
default:
if(R->TrapBadOps)
printf
(
"[Z80 %lX] Unrecognized instruction: DD CB %02X %02X at PC=%04X\n",
(long)(R->User),OpZ80(R->PC.W-2),OpZ80(R->PC.W-1),R->PC.W-4
);
break;
}
#undef XX
}
......@@ -402,12 +382,7 @@ static void CodesFDCB(Z80 *R)
{
#include "CodesXCB.h"
default:
if(R->TrapBadOps)
printf
(
"[Z80 %lX] Unrecognized instruction: FD CB %02X %02X at PC=%04X\n",
(long)R->User,OpZ80(R->PC.W-2),OpZ80(R->PC.W-1),R->PC.W-4
);
break;
}
#undef XX
}
......@@ -430,12 +405,7 @@ static void CodesED(Z80 *R)
case PFX_ED:
R->PC.W--;break;
default:
if(R->TrapBadOps)
printf
(
"[Z80 %lX] Unrecognized instruction: ED %02X at PC=%04X\n",
(long)R->User,OpZ80(R->PC.W-1),R->PC.W-2
);
break;
}
}
......@@ -461,12 +431,7 @@ static void CodesDD(Z80 *R)
case PFX_CB:
CodesDDCB(R);break;
default:
if(R->TrapBadOps)
printf
(
"[Z80 %lX] Unrecognized instruction: DD %02X at PC=%04X\n",
(long)R->User,OpZ80(R->PC.W-1),R->PC.W-2
);
break;
}
#undef XX
}
......@@ -493,11 +458,7 @@ static void CodesFD(Z80 *R)
case PFX_CB:
CodesFDCB(R);break;
default:
printf
(
"Unrecognized instruction: FD %02X at PC=%04X\n",
OpZ80(R->PC.W-1),R->PC.W-2
);
break;
}
#undef XX
}
......
......@@ -13,6 +13,8 @@
/** changes to this file. **/
/*************************************************************/
#include <retro_inline.h>
static int FirstLine = 18; /* First scanline in the XBuf */
static void Sprites(byte Y,pixel *Line);
......@@ -42,7 +44,7 @@ static void ClearLine(pixel *P,pixel C)
/** Given a color in YJK format, return the corresponding **/
/** palette entry. **/
/*************************************************************/
INLINE pixel YJKColor(int Y,int J,int K)
static INLINE pixel YJKColor(int Y,int J,int K)
{
int R,G,B;
......
......@@ -24,16 +24,7 @@
#include "WD1793.h" /* WD1793 FDC emulation */
#include <stdint.h>
/** INLINE ***************************************************/
/** C99 standard has "inline", but older compilers've used **/
/** __inline for the same purpose. **/
/*************************************************************/
#ifdef __C99__
#define INLINE static inline
#else
#define INLINE static __inline
#endif
#include <retro_inline.h>
#ifdef __cplusplus
extern "C" {
......
......@@ -188,7 +188,7 @@ static int lmmm_timing[8]={ 1160, 1599, 1160, 1172,
/** VDPVRMP() **********************************************/
/** Calculate addr of a pixel in vram **/
/*************************************************************/
INLINE byte *VDPVRMP(byte M,int X,int Y)
static INLINE byte *VDPVRMP(byte M,int X,int Y)
{
switch(M)
{
......@@ -204,7 +204,7 @@ INLINE byte *VDPVRMP(byte M,int X,int Y)
/** VDPpoint5() ***********************************************/
/** Get a pixel on screen 5 **/
/*************************************************************/
INLINE byte VDPpoint5(int SX, int SY)
static INLINE byte VDPpoint5(int SX, int SY)
{
return (*VDP_VRMP5(SX, SY) >>
(((~SX)&1)<<2)
......@@ -214,7 +214,7 @@ INLINE byte VDPpoint5(int SX, int SY)
/** VDPpoint6() ***********************************************/
/** Get a pixel on screen 6 **/
/*************************************************************/
INLINE byte VDPpoint6(int SX, int SY)
static INLINE byte VDPpoint6(int SX, int SY)
{
return (*VDP_VRMP6(SX, SY) >>
(((~SX)&3)<<1)
......@@ -224,7 +224,7 @@ INLINE byte VDPpoint6(int SX, int SY)
/** VDPpoint7() ***********************************************/
/** Get a pixel on screen 7 **/
/*************************************************************/
INLINE byte VDPpoint7(int SX, int SY)
static INLINE byte VDPpoint7(int SX, int SY)
{
return (*VDP_VRMP7(SX, SY) >>
(((~SX)&1)<<2)
......@@ -234,7 +234,7 @@ INLINE byte VDPpoint7(int SX, int SY)
/** VDPpoint8() ***********************************************/
/** Get a pixel on screen 8 **/
/*************************************************************/
INLINE byte VDPpoint8(int SX, int SY)
static INLINE byte VDPpoint8(int SX, int SY)
{
return *VDP_VRMP8(SX, SY);
}
......@@ -242,7 +242,7 @@ INLINE byte VDPpoint8(int SX, int SY)
/** VDPpoint() ************************************************/
/** Get a pixel on a screen **/
/*************************************************************/
INLINE byte VDPpoint(byte SM, int SX, int SY)
static INLINE byte VDPpoint(byte SM, int SX, int SY)
{
switch(SM)
{
......@@ -259,7 +259,7 @@ INLINE byte VDPpoint(byte SM, int SX, int SY)
/** Low level function to set a pixel on a screen **/
/** Make it inline to make it fast **/
/*************************************************************/
INLINE void VDPpsetlowlevel(byte *P, byte CL, byte M, byte OP)
static INLINE void VDPpsetlowlevel(byte *P, byte CL, byte M, byte OP)
{
switch (OP)
{
......@@ -279,7 +279,7 @@ INLINE void VDPpsetlowlevel(byte *P, byte CL, byte M, byte OP)
/** VDPpset5() ***********************************************/
/** Set a pixel on screen 5 **/
/*************************************************************/
INLINE void VDPpset5(int DX, int DY, byte CL, byte OP)
static INLINE void VDPpset5(int DX, int DY, byte CL, byte OP)
{
byte SH = ((~DX)&1)<<2;
......@@ -290,7 +290,7 @@ INLINE void VDPpset5(int DX, int DY, byte CL, byte OP)
/** VDPpset6() ***********************************************/
/** Set a pixel on screen 6 **/
/*************************************************************/
INLINE void VDPpset6(int DX, int DY, byte CL, byte OP)
static INLINE void VDPpset6(int DX, int DY, byte CL, byte OP)
{
byte SH = ((~DX)&3)<<1;
......@@ -301,7 +301,7 @@ INLINE void VDPpset6(int DX, int DY, byte CL, byte OP)
/** VDPpset7() ***********************************************/
/** Set a pixel on screen 7 **/
/*************************************************************/
INLINE void VDPpset7(int DX, int DY, byte CL, byte OP)
static INLINE void VDPpset7(int DX, int DY, byte CL, byte OP)
{
byte SH = ((~DX)&1)<<2;
......@@ -312,7 +312,7 @@ INLINE void VDPpset7(int DX, int DY, byte CL, byte OP)
/** VDPpset8() ***********************************************/
/** Set a pixel on screen 8 **/
/*************************************************************/
INLINE void VDPpset8(int DX, int DY, byte CL, byte OP)
static INLINE void VDPpset8(int DX, int DY, byte CL, byte OP)
{
VDPpsetlowlevel(VDP_VRMP8(DX, DY),
CL, 0, OP);
......@@ -321,7 +321,7 @@ INLINE void VDPpset8(int DX, int DY, byte CL, byte OP)
/** VDPpset() ************************************************/
/** Set a pixel on a screen **/
/*************************************************************/
INLINE void VDPpset(byte SM, int DX, int DY, byte CL, byte OP)
static INLINE void VDPpset(byte SM, int DX, int DY, byte CL, byte OP)
{
switch (SM) {
case 0: VDPpset5(DX, DY, CL, OP); break;
......
......@@ -6,6 +6,7 @@
#include <string.h>
#include <stdint.h>
#include <compat/posix_string.h>
#include <streams/file_stream.h>
#include "MSX.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment