Got rid of a lot of incorrect variable declaration and missing extern's, 86Box now successfully links when compiled with GCC 10.x.
This commit is contained in:
@@ -15,8 +15,8 @@ extern RecompOpFn recomp_opcodes_dc[512];
|
|||||||
extern RecompOpFn recomp_opcodes_dd[512];
|
extern RecompOpFn recomp_opcodes_dd[512];
|
||||||
extern RecompOpFn recomp_opcodes_de[512];
|
extern RecompOpFn recomp_opcodes_de[512];
|
||||||
extern RecompOpFn recomp_opcodes_df[512];
|
extern RecompOpFn recomp_opcodes_df[512];
|
||||||
RecompOpFn recomp_opcodes_REPE[512];
|
extern RecompOpFn recomp_opcodes_REPE[512];
|
||||||
RecompOpFn recomp_opcodes_REPNE[512];
|
extern RecompOpFn recomp_opcodes_REPNE[512];
|
||||||
|
|
||||||
#define REG_EAX 0
|
#define REG_EAX 0
|
||||||
#define REG_ECX 1
|
#define REG_ECX 1
|
||||||
|
@@ -37,11 +37,6 @@ uint32_t dr[8];
|
|||||||
|
|
||||||
uint32_t use32;
|
uint32_t use32;
|
||||||
int stack32;
|
int stack32;
|
||||||
int optype;
|
|
||||||
|
|
||||||
int trap;
|
|
||||||
|
|
||||||
uint32_t rmdat;
|
|
||||||
|
|
||||||
uint32_t *eal_r, *eal_w;
|
uint32_t *eal_r, *eal_w;
|
||||||
|
|
||||||
@@ -57,8 +52,10 @@ uint16_t cpu_cur_status = 0;
|
|||||||
uint32_t cpu_cur_status = 0;
|
uint32_t cpu_cur_status = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32_t pccache;
|
extern uint8_t *pccache2;
|
||||||
uint8_t *pccache2;
|
|
||||||
|
extern int optype;
|
||||||
|
extern uint32_t pccache;
|
||||||
|
|
||||||
|
|
||||||
int in_sys = 0;
|
int in_sys = 0;
|
||||||
|
@@ -17,6 +17,10 @@
|
|||||||
#include "386_common.h"
|
#include "386_common.h"
|
||||||
|
|
||||||
|
|
||||||
|
uint32_t x87_pc_off,x87_op_off;
|
||||||
|
uint16_t x87_pc_seg,x87_op_seg;
|
||||||
|
|
||||||
|
|
||||||
#ifdef ENABLE_FPU_LOG
|
#ifdef ENABLE_FPU_LOG
|
||||||
int fpu_do_log = ENABLE_FPU_LOG;
|
int fpu_do_log = ENABLE_FPU_LOG;
|
||||||
|
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
#define C2 (1<<10)
|
#define C2 (1<<10)
|
||||||
#define C3 (1<<14)
|
#define C3 (1<<14)
|
||||||
|
|
||||||
uint32_t x87_pc_off,x87_op_off;
|
extern uint32_t x87_pc_off,x87_op_off;
|
||||||
uint16_t x87_pc_seg,x87_op_seg;
|
extern uint16_t x87_pc_seg,x87_op_seg;
|
||||||
|
|
||||||
static __inline void x87_set_mmx()
|
static __inline void x87_set_mmx()
|
||||||
{
|
{
|
||||||
|
@@ -178,7 +178,7 @@ extern uintptr_t *writelookup2;
|
|||||||
extern int writelnext;
|
extern int writelnext;
|
||||||
extern uint32_t ram_mapped_addr[64];
|
extern uint32_t ram_mapped_addr[64];
|
||||||
|
|
||||||
mem_mapping_t base_mapping,
|
extern mem_mapping_t base_mapping,
|
||||||
ram_low_mapping,
|
ram_low_mapping,
|
||||||
#if 1
|
#if 1
|
||||||
ram_mid_mapping,
|
ram_mid_mapping,
|
||||||
|
@@ -62,17 +62,17 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Global variables residing in the platform module. */
|
/* Global variables residing in the platform module. */
|
||||||
GLOBAL int dopause, /* system is paused */
|
extern int dopause, /* system is paused */
|
||||||
doresize, /* screen resize requested */
|
doresize, /* screen resize requested */
|
||||||
quited, /* system exit requested */
|
quited, /* system exit requested */
|
||||||
mouse_capture; /* mouse is captured in app */
|
mouse_capture; /* mouse is captured in app */
|
||||||
GLOBAL uint64_t timer_freq;
|
extern uint64_t timer_freq;
|
||||||
GLOBAL int infocus;
|
extern int infocus;
|
||||||
GLOBAL char emu_version[200]; /* version ID string */
|
extern char emu_version[200]; /* version ID string */
|
||||||
GLOBAL int rctrl_is_lalt;
|
extern int rctrl_is_lalt;
|
||||||
GLOBAL int update_icons;
|
extern int update_icons;
|
||||||
|
|
||||||
GLOBAL int unscaled_size_x, /* current unscaled size X */
|
extern int unscaled_size_x, /* current unscaled size X */
|
||||||
unscaled_size_y; /* current unscaled size Y */
|
unscaled_size_y; /* current unscaled size Y */
|
||||||
|
|
||||||
/* System-related functions. */
|
/* System-related functions. */
|
||||||
|
@@ -292,26 +292,26 @@ extern const device_t paradise_wd90c11_device;
|
|||||||
extern const device_t paradise_wd90c30_device;
|
extern const device_t paradise_wd90c30_device;
|
||||||
|
|
||||||
/* S3 9XX/8XX/Vision/Trio */
|
/* S3 9XX/8XX/Vision/Trio */
|
||||||
const device_t s3_orchid_86c911_isa_device;
|
extern const device_t s3_orchid_86c911_isa_device;
|
||||||
const device_t s3_metheus_premier_86c928_isa_device;
|
extern const device_t s3_metheus_premier_86c928_isa_device;
|
||||||
const device_t s3_metheus_premier_86c928_vlb_device;
|
extern const device_t s3_metheus_premier_86c928_vlb_device;
|
||||||
const device_t s3_v7mirage_86c801_isa_device;
|
extern const device_t s3_v7mirage_86c801_isa_device;
|
||||||
const device_t s3_phoenix_86c805_vlb_device;
|
extern const device_t s3_phoenix_86c805_vlb_device;
|
||||||
const device_t s3_bahamas64_vlb_device;
|
extern const device_t s3_bahamas64_vlb_device;
|
||||||
const device_t s3_bahamas64_pci_device;
|
extern const device_t s3_bahamas64_pci_device;
|
||||||
const device_t s3_9fx_vlb_device;
|
extern const device_t s3_9fx_vlb_device;
|
||||||
const device_t s3_9fx_pci_device;
|
extern const device_t s3_9fx_pci_device;
|
||||||
const device_t s3_phoenix_trio32_vlb_device;
|
extern const device_t s3_phoenix_trio32_vlb_device;
|
||||||
const device_t s3_phoenix_trio32_pci_device;
|
extern const device_t s3_phoenix_trio32_pci_device;
|
||||||
const device_t s3_phoenix_trio64_vlb_device;
|
extern const device_t s3_phoenix_trio64_vlb_device;
|
||||||
const device_t s3_phoenix_trio64_onboard_pci_device;
|
extern const device_t s3_phoenix_trio64_onboard_pci_device;
|
||||||
const device_t s3_phoenix_trio64_pci_device;
|
extern const device_t s3_phoenix_trio64_pci_device;
|
||||||
const device_t s3_phoenix_vision864_pci_device;
|
extern const device_t s3_phoenix_vision864_pci_device;
|
||||||
const device_t s3_phoenix_vision864_vlb_device;
|
extern const device_t s3_phoenix_vision864_vlb_device;
|
||||||
const device_t s3_diamond_stealth64_pci_device;
|
extern const device_t s3_diamond_stealth64_pci_device;
|
||||||
const device_t s3_diamond_stealth64_vlb_device;
|
extern const device_t s3_diamond_stealth64_vlb_device;
|
||||||
const device_t s3_diamond_stealth64_964_pci_device;
|
extern const device_t s3_diamond_stealth64_964_pci_device;
|
||||||
const device_t s3_diamond_stealth64_964_vlb_device;
|
extern const device_t s3_diamond_stealth64_964_vlb_device;
|
||||||
|
|
||||||
/* S3 ViRGE */
|
/* S3 ViRGE */
|
||||||
extern const device_t s3_virge_vlb_device;
|
extern const device_t s3_virge_vlb_device;
|
||||||
|
15
src/pc.c
15
src/pc.c
@@ -78,6 +78,15 @@
|
|||||||
#include <86box/plat_midi.h>
|
#include <86box/plat_midi.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* Stuff that used to be globally declared in plat.h but is now extern there
|
||||||
|
and declared here instead. */
|
||||||
|
int dopause, /* system is paused */
|
||||||
|
doresize, /* screen resize requested */
|
||||||
|
quited; /* system exit requested */
|
||||||
|
uint64_t timer_freq;
|
||||||
|
char emu_version[200]; /* version ID string */
|
||||||
|
|
||||||
|
|
||||||
/* Commandline options. */
|
/* Commandline options. */
|
||||||
int dump_on_exit = 0; /* (O) dump regs on exit */
|
int dump_on_exit = 0; /* (O) dump regs on exit */
|
||||||
int do_dump_config = 0; /* (O) dump config on load */
|
int do_dump_config = 0; /* (O) dump config on load */
|
||||||
@@ -101,7 +110,7 @@ int window_w, window_h, /* (C) window size and */
|
|||||||
window_x, window_y, /* position info */
|
window_x, window_y, /* position info */
|
||||||
window_remember,
|
window_remember,
|
||||||
vid_resize, /* (C) allow resizing */
|
vid_resize, /* (C) allow resizing */
|
||||||
invert_display, /* (C) invert the display */
|
invert_display = 0, /* (C) invert the display */
|
||||||
suppress_overscan = 0; /* (C) suppress overscans */
|
suppress_overscan = 0; /* (C) suppress overscans */
|
||||||
int scale = 0; /* (C) screen scale factor */
|
int scale = 0; /* (C) screen scale factor */
|
||||||
int vid_api = 0; /* (C) video renderer */
|
int vid_api = 0; /* (C) video renderer */
|
||||||
@@ -141,8 +150,8 @@ extern int
|
|||||||
|
|
||||||
int fps, framecount; /* emulator % */
|
int fps, framecount; /* emulator % */
|
||||||
|
|
||||||
int CPUID;
|
extern int CPUID;
|
||||||
int output;
|
extern int output;
|
||||||
int atfullspeed;
|
int atfullspeed;
|
||||||
int clockrate;
|
int clockrate;
|
||||||
|
|
||||||
|
@@ -109,7 +109,6 @@ int video_res_x = 0,
|
|||||||
video_res_y = 0,
|
video_res_y = 0,
|
||||||
video_bpp = 0;
|
video_bpp = 0;
|
||||||
static int video_force_resize;
|
static int video_force_resize;
|
||||||
int invert_display = 0;
|
|
||||||
int video_grayscale = 0;
|
int video_grayscale = 0;
|
||||||
int video_graytype = 0;
|
int video_graytype = 0;
|
||||||
static int vid_type;
|
static int vid_type;
|
||||||
|
@@ -27,9 +27,6 @@ endif
|
|||||||
ifndef DEV_BUILD
|
ifndef DEV_BUILD
|
||||||
DEV_BUILD := n
|
DEV_BUILD := n
|
||||||
endif
|
endif
|
||||||
ifndef FLTO
|
|
||||||
FLTO := full
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(DEV_BUILD), y)
|
ifeq ($(DEV_BUILD), y)
|
||||||
ifndef DEBUG
|
ifndef DEBUG
|
||||||
@@ -320,7 +317,7 @@ else
|
|||||||
ifeq ($(OPTIM), y)
|
ifeq ($(OPTIM), y)
|
||||||
AOPTIM := -mtune=native
|
AOPTIM := -mtune=native
|
||||||
ifndef COPTIM
|
ifndef COPTIM
|
||||||
COPTIM := -O3 -ffp-contract=fast -flto=$(FLTO)
|
COPTIM := -O3 -ffp-contract=fast -flto
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifndef COPTIM
|
ifndef COPTIM
|
||||||
|
@@ -27,9 +27,6 @@ endif
|
|||||||
ifndef DEV_BUILD
|
ifndef DEV_BUILD
|
||||||
DEV_BUILD := n
|
DEV_BUILD := n
|
||||||
endif
|
endif
|
||||||
ifndef FLTO
|
|
||||||
FLTO := full
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(DEV_BUILD), y)
|
ifeq ($(DEV_BUILD), y)
|
||||||
ifndef DEBUG
|
ifndef DEBUG
|
||||||
@@ -317,7 +314,7 @@ else
|
|||||||
ifeq ($(OPTIM), y)
|
ifeq ($(OPTIM), y)
|
||||||
AOPTIM := -mtune=native
|
AOPTIM := -mtune=native
|
||||||
ifndef COPTIM
|
ifndef COPTIM
|
||||||
COPTIM := -O3 -ffp-contract=fast -flto=$(FLTO)
|
COPTIM := -O3 -ffp-contract=fast -flto
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifndef COPTIM
|
ifndef COPTIM
|
||||||
|
@@ -59,8 +59,8 @@ int infocus = 1;
|
|||||||
int rctrl_is_lalt = 0;
|
int rctrl_is_lalt = 0;
|
||||||
int user_resize = 0;
|
int user_resize = 0;
|
||||||
|
|
||||||
char openfilestring[512];
|
extern char openfilestring[512];
|
||||||
WCHAR wopenfilestring[512];
|
extern WCHAR wopenfilestring[512];
|
||||||
|
|
||||||
|
|
||||||
/* Local data. */
|
/* Local data. */
|
||||||
|
Reference in New Issue
Block a user