Dynamic recompiler now works on Linux (32-bit only)
This commit is contained in:
parent
6caeca2c7c
commit
1fb4de4507
10 changed files with 3644 additions and 35 deletions
|
|
@ -11,7 +11,6 @@
|
|||
#include "cpu.h"
|
||||
#include "fdc.h"
|
||||
#include "timer.h"
|
||||
#include "video.h"
|
||||
|
||||
#include "386_common.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -40,3 +40,14 @@ resid-fp/wave8580_PST.cc resid-fp/wave8580_P_T.cc resid-fp/wave8580__ST.cc \
|
|||
resid-fp/wave.cc
|
||||
|
||||
|
||||
if DYNAREC
|
||||
pcem_CFLAGS += -DDYNAREC
|
||||
pcem_SOURCES += 386_dynarec.c 386_dynarec_ops.c codegen.c codegen_ops.c \
|
||||
codegen_timing_486.c codegen_timing_pentium.c
|
||||
|
||||
if CPU_I386
|
||||
pcem_SOURCES += codegen_x86.c
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
|
|
|||
232
src/Makefile.in
232
src/Makefile.in
|
|
@ -35,7 +35,14 @@ POST_INSTALL = :
|
|||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = pcem$(EXEEXT)
|
||||
@DYNAREC_TRUE@am__append_1 = -DDYNAREC
|
||||
@DYNAREC_TRUE@am__append_2 = 386_dynarec.c 386_dynarec_ops.c codegen.c codegen_ops.c \
|
||||
@DYNAREC_TRUE@codegen_timing_486.c codegen_timing_pentium.c
|
||||
|
||||
@CPU_I386_TRUE@@DYNAREC_TRUE@am__append_3 = codegen_x86.c
|
||||
subdir = src
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
|
|
@ -47,6 +54,51 @@ CONFIG_CLEAN_FILES =
|
|||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am__pcem_SOURCES_DIST = 386.c 808x.c acer386sx.c ali1429.c \
|
||||
allegro-gui.c allegro-gui-configure.c allegro-gui-hdconf.c \
|
||||
allegro-joystick.c allegro-keyboard.c allegro-main.c \
|
||||
allegro-midi.c allegro-mouse.c allegro-video.c amstrad.c \
|
||||
cdrom-ioctl-linux.c cdrom-null.c config.c cpu.c dac.c device.c \
|
||||
disc.c disc_fdi.c disc_img.c dma.c fdc.c fdi2raw.c gameport.c \
|
||||
headland.c i430lx.c i430fx.c i430vx.c ide.c intel.c \
|
||||
intel_flash.c io.c jim.c keyboard.c keyboard_amstrad.c \
|
||||
keyboard_at.c keyboard_olim24.c keyboard_pcjr.c keyboard_xt.c \
|
||||
linux-time.c lpt.c mcr.c mem.c model.c mouse.c mouse_ps2.c \
|
||||
mouse_serial.c neat.c nmi.c nvr.c olivetti_m24.c opti.c pc.c \
|
||||
pci.c pic.c piix.c pit.c ppi.c rom.c serial.c sis496.c sound.c \
|
||||
sound_ad1848.c sound_adlib.c sound_adlibgold.c sound_cms.c \
|
||||
sound_emu8k.c sound_gus.c sound_mpu401_uart.c sound_opl.c \
|
||||
sound_pas16.c sound_sb.c sound_sb_dsp.c sound_sn76489.c \
|
||||
sound_speaker.c sound_ssi2001.c sound_wss.c soundopenal.c \
|
||||
thread-pthread.c timer.c um8669f.c um8881f.c vid_ati_eeprom.c \
|
||||
vid_ati_mach64.c vid_ati18800.c vid_ati28800.c \
|
||||
vid_ati68860_ramdac.c vid_cga.c vid_cl5429.c vid_ega.c \
|
||||
vid_et4000.c vid_et4000w32.c vid_hercules.c vid_icd2061.c \
|
||||
vid_ics2595.c vid_mda.c vid_olivetti_m24.c vid_oti067.c \
|
||||
vid_paradise.c vid_pc200.c vid_pc1512.c vid_pc1640.c \
|
||||
vid_pcjr.c vid_s3.c vid_s3_virge.c vid_sdac_ramdac.c \
|
||||
vid_stg_ramdac.c vid_svga.c vid_svga_render.c vid_tandy.c \
|
||||
vid_tgui9440.c vid_tkd8001_ramdac.c vid_tvga.c \
|
||||
vid_unk_ramdac.c vid_vga.c vid_voodoo.c video.c wd76c10.c \
|
||||
x86seg.c x87.c xtide.c sound_dbopl.cc sound_resid.cc \
|
||||
dosbox/dbopl.cpp resid-fp/convolve.cc resid-fp/convolve-sse.cc \
|
||||
resid-fp/envelope.cc resid-fp/extfilt.cc resid-fp/filter.cc \
|
||||
resid-fp/pot.cc resid-fp/sid.cc resid-fp/voice.cc \
|
||||
resid-fp/wave6581_PS_.cc resid-fp/wave6581_PST.cc \
|
||||
resid-fp/wave6581_P_T.cc resid-fp/wave6581__ST.cc \
|
||||
resid-fp/wave8580_PS_.cc resid-fp/wave8580_PST.cc \
|
||||
resid-fp/wave8580_P_T.cc resid-fp/wave8580__ST.cc \
|
||||
resid-fp/wave.cc 386_dynarec.c 386_dynarec_ops.c codegen.c \
|
||||
codegen_ops.c codegen_timing_486.c codegen_timing_pentium.c \
|
||||
codegen_x86.c
|
||||
@DYNAREC_TRUE@am__objects_1 = pcem-386_dynarec.$(OBJEXT) \
|
||||
@DYNAREC_TRUE@ pcem-386_dynarec_ops.$(OBJEXT) \
|
||||
@DYNAREC_TRUE@ pcem-codegen.$(OBJEXT) \
|
||||
@DYNAREC_TRUE@ pcem-codegen_ops.$(OBJEXT) \
|
||||
@DYNAREC_TRUE@ pcem-codegen_timing_486.$(OBJEXT) \
|
||||
@DYNAREC_TRUE@ pcem-codegen_timing_pentium.$(OBJEXT)
|
||||
@CPU_I386_TRUE@@DYNAREC_TRUE@am__objects_2 = \
|
||||
@CPU_I386_TRUE@@DYNAREC_TRUE@ pcem-codegen_x86.$(OBJEXT)
|
||||
am_pcem_OBJECTS = pcem-386.$(OBJEXT) pcem-808x.$(OBJEXT) \
|
||||
pcem-acer386sx.$(OBJEXT) pcem-ali1429.$(OBJEXT) \
|
||||
pcem-allegro-gui.$(OBJEXT) \
|
||||
|
|
@ -113,7 +165,8 @@ am_pcem_OBJECTS = pcem-386.$(OBJEXT) pcem-808x.$(OBJEXT) \
|
|||
wave6581_PS_.$(OBJEXT) wave6581_PST.$(OBJEXT) \
|
||||
wave6581_P_T.$(OBJEXT) wave6581__ST.$(OBJEXT) \
|
||||
wave8580_PS_.$(OBJEXT) wave8580_PST.$(OBJEXT) \
|
||||
wave8580_P_T.$(OBJEXT) wave8580__ST.$(OBJEXT) wave.$(OBJEXT)
|
||||
wave8580_P_T.$(OBJEXT) wave8580__ST.$(OBJEXT) wave.$(OBJEXT) \
|
||||
$(am__objects_1) $(am__objects_2)
|
||||
pcem_OBJECTS = $(am_pcem_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
pcem_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
|
|
@ -132,7 +185,7 @@ CXXLD = $(CXX)
|
|||
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
||||
-o $@
|
||||
SOURCES = $(pcem_SOURCES)
|
||||
DIST_SOURCES = $(pcem_SOURCES)
|
||||
DIST_SOURCES = $(am__pcem_SOURCES_DIST)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
|
@ -195,14 +248,22 @@ am__quote = @am__quote@
|
|||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
|
|
@ -228,33 +289,43 @@ top_builddir = @top_builddir@
|
|||
top_srcdir = @top_srcdir@
|
||||
noinst_SCRIPTS = ../pcem
|
||||
CLEANFILES = $(noinst_SCRIPTS)
|
||||
pcem_CFLAGS = $(allegro_CFLAGS)
|
||||
pcem_CFLAGS = $(allegro_CFLAGS) $(am__append_1)
|
||||
pcem_LDADD = $(allegro_LIBS) -lopenal -lalut
|
||||
pcem_SOURCES = 386.c 808x.c acer386sx.c ali1429.c allegro-gui.c allegro-gui-configure.c \
|
||||
allegro-gui-hdconf.c allegro-joystick.c allegro-keyboard.c allegro-main.c \
|
||||
allegro-midi.c allegro-mouse.c allegro-video.c amstrad.c cdrom-ioctl-linux.c cdrom-null.c \
|
||||
config.c cpu.c dac.c device.c disc.c disc_fdi.c disc_img.c dma.c fdc.c fdi2raw.c gameport.c \
|
||||
headland.c i430lx.c i430fx.c i430vx.c ide.c intel.c intel_flash.c io.c jim.c \
|
||||
keyboard.c keyboard_amstrad.c keyboard_at.c keyboard_olim24.c keyboard_pcjr.c keyboard_xt.c \
|
||||
linux-time.c lpt.c mcr.c mem.c model.c mouse.c mouse_ps2.c mouse_serial.c neat.c nmi.c nvr.c \
|
||||
olivetti_m24.c opti.c pc.c pci.c pic.c piix.c pit.c ppi.c rom.c serial.c sis496.c sound.c \
|
||||
sound_ad1848.c sound_adlib.c sound_adlibgold.c sound_cms.c sound_emu8k.c sound_gus.c \
|
||||
sound_mpu401_uart.c sound_opl.c sound_pas16.c sound_sb.c sound_sb_dsp.c sound_sn76489.c \
|
||||
sound_speaker.c sound_ssi2001.c sound_wss.c soundopenal.c thread-pthread.c timer.c um8669f.c \
|
||||
um8881f.c vid_ati_eeprom.c vid_ati_mach64.c vid_ati18800.c vid_ati28800.c vid_ati68860_ramdac.c \
|
||||
vid_cga.c vid_cl5429.c vid_ega.c vid_et4000.c vid_et4000w32.c vid_hercules.c vid_icd2061.c \
|
||||
vid_ics2595.c vid_mda.c vid_olivetti_m24.c vid_oti067.c vid_paradise.c vid_pc200.c \
|
||||
vid_pc1512.c vid_pc1640.c vid_pcjr.c vid_s3.c vid_s3_virge.c vid_sdac_ramdac.c \
|
||||
vid_stg_ramdac.c vid_svga.c vid_svga_render.c vid_tandy.c vid_tgui9440.c \
|
||||
vid_tkd8001_ramdac.c vid_tvga.c vid_unk_ramdac.c vid_vga.c vid_voodoo.c video.c wd76c10.c \
|
||||
x86seg.c x87.c xtide.c sound_dbopl.cc sound_resid.cc dosbox/dbopl.cpp \
|
||||
resid-fp/convolve.cc resid-fp/convolve-sse.cc resid-fp/envelope.cc \
|
||||
resid-fp/extfilt.cc resid-fp/filter.cc resid-fp/pot.cc resid-fp/sid.cc \
|
||||
resid-fp/voice.cc resid-fp/wave6581_PS_.cc resid-fp/wave6581_PST.cc \
|
||||
resid-fp/wave6581_P_T.cc resid-fp/wave6581__ST.cc resid-fp/wave8580_PS_.cc \
|
||||
resid-fp/wave8580_PST.cc resid-fp/wave8580_P_T.cc resid-fp/wave8580__ST.cc \
|
||||
resid-fp/wave.cc
|
||||
|
||||
pcem_SOURCES = 386.c 808x.c acer386sx.c ali1429.c allegro-gui.c \
|
||||
allegro-gui-configure.c allegro-gui-hdconf.c \
|
||||
allegro-joystick.c allegro-keyboard.c allegro-main.c \
|
||||
allegro-midi.c allegro-mouse.c allegro-video.c amstrad.c \
|
||||
cdrom-ioctl-linux.c cdrom-null.c config.c cpu.c dac.c device.c \
|
||||
disc.c disc_fdi.c disc_img.c dma.c fdc.c fdi2raw.c gameport.c \
|
||||
headland.c i430lx.c i430fx.c i430vx.c ide.c intel.c \
|
||||
intel_flash.c io.c jim.c keyboard.c keyboard_amstrad.c \
|
||||
keyboard_at.c keyboard_olim24.c keyboard_pcjr.c keyboard_xt.c \
|
||||
linux-time.c lpt.c mcr.c mem.c model.c mouse.c mouse_ps2.c \
|
||||
mouse_serial.c neat.c nmi.c nvr.c olivetti_m24.c opti.c pc.c \
|
||||
pci.c pic.c piix.c pit.c ppi.c rom.c serial.c sis496.c sound.c \
|
||||
sound_ad1848.c sound_adlib.c sound_adlibgold.c sound_cms.c \
|
||||
sound_emu8k.c sound_gus.c sound_mpu401_uart.c sound_opl.c \
|
||||
sound_pas16.c sound_sb.c sound_sb_dsp.c sound_sn76489.c \
|
||||
sound_speaker.c sound_ssi2001.c sound_wss.c soundopenal.c \
|
||||
thread-pthread.c timer.c um8669f.c um8881f.c vid_ati_eeprom.c \
|
||||
vid_ati_mach64.c vid_ati18800.c vid_ati28800.c \
|
||||
vid_ati68860_ramdac.c vid_cga.c vid_cl5429.c vid_ega.c \
|
||||
vid_et4000.c vid_et4000w32.c vid_hercules.c vid_icd2061.c \
|
||||
vid_ics2595.c vid_mda.c vid_olivetti_m24.c vid_oti067.c \
|
||||
vid_paradise.c vid_pc200.c vid_pc1512.c vid_pc1640.c \
|
||||
vid_pcjr.c vid_s3.c vid_s3_virge.c vid_sdac_ramdac.c \
|
||||
vid_stg_ramdac.c vid_svga.c vid_svga_render.c vid_tandy.c \
|
||||
vid_tgui9440.c vid_tkd8001_ramdac.c vid_tvga.c \
|
||||
vid_unk_ramdac.c vid_vga.c vid_voodoo.c video.c wd76c10.c \
|
||||
x86seg.c x87.c xtide.c sound_dbopl.cc sound_resid.cc \
|
||||
dosbox/dbopl.cpp resid-fp/convolve.cc resid-fp/convolve-sse.cc \
|
||||
resid-fp/envelope.cc resid-fp/extfilt.cc resid-fp/filter.cc \
|
||||
resid-fp/pot.cc resid-fp/sid.cc resid-fp/voice.cc \
|
||||
resid-fp/wave6581_PS_.cc resid-fp/wave6581_PST.cc \
|
||||
resid-fp/wave6581_P_T.cc resid-fp/wave6581__ST.cc \
|
||||
resid-fp/wave8580_PS_.cc resid-fp/wave8580_PST.cc \
|
||||
resid-fp/wave8580_P_T.cc resid-fp/wave8580__ST.cc \
|
||||
resid-fp/wave.cc $(am__append_2) $(am__append_3)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
|
|
@ -343,6 +414,8 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extfilt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-386.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-386_dynarec.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-386_dynarec_ops.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-808x.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-acer386sx.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-ali1429.Po@am__quote@
|
||||
|
|
@ -358,6 +431,11 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-amstrad.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-cdrom-ioctl-linux.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-cdrom-null.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-codegen.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-codegen_ops.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-codegen_timing_486.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-codegen_timing_pentium.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-codegen_x86.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-config.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-cpu.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-dac.Po@am__quote@
|
||||
|
|
@ -2231,6 +2309,104 @@ pcem-xtide.obj: xtide.c
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-xtide.obj `if test -f 'xtide.c'; then $(CYGPATH_W) 'xtide.c'; else $(CYGPATH_W) '$(srcdir)/xtide.c'; fi`
|
||||
|
||||
pcem-386_dynarec.o: 386_dynarec.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-386_dynarec.o -MD -MP -MF $(DEPDIR)/pcem-386_dynarec.Tpo -c -o pcem-386_dynarec.o `test -f '386_dynarec.c' || echo '$(srcdir)/'`386_dynarec.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-386_dynarec.Tpo $(DEPDIR)/pcem-386_dynarec.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='386_dynarec.c' object='pcem-386_dynarec.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-386_dynarec.o `test -f '386_dynarec.c' || echo '$(srcdir)/'`386_dynarec.c
|
||||
|
||||
pcem-386_dynarec.obj: 386_dynarec.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-386_dynarec.obj -MD -MP -MF $(DEPDIR)/pcem-386_dynarec.Tpo -c -o pcem-386_dynarec.obj `if test -f '386_dynarec.c'; then $(CYGPATH_W) '386_dynarec.c'; else $(CYGPATH_W) '$(srcdir)/386_dynarec.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-386_dynarec.Tpo $(DEPDIR)/pcem-386_dynarec.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='386_dynarec.c' object='pcem-386_dynarec.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-386_dynarec.obj `if test -f '386_dynarec.c'; then $(CYGPATH_W) '386_dynarec.c'; else $(CYGPATH_W) '$(srcdir)/386_dynarec.c'; fi`
|
||||
|
||||
pcem-386_dynarec_ops.o: 386_dynarec_ops.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-386_dynarec_ops.o -MD -MP -MF $(DEPDIR)/pcem-386_dynarec_ops.Tpo -c -o pcem-386_dynarec_ops.o `test -f '386_dynarec_ops.c' || echo '$(srcdir)/'`386_dynarec_ops.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-386_dynarec_ops.Tpo $(DEPDIR)/pcem-386_dynarec_ops.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='386_dynarec_ops.c' object='pcem-386_dynarec_ops.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-386_dynarec_ops.o `test -f '386_dynarec_ops.c' || echo '$(srcdir)/'`386_dynarec_ops.c
|
||||
|
||||
pcem-386_dynarec_ops.obj: 386_dynarec_ops.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-386_dynarec_ops.obj -MD -MP -MF $(DEPDIR)/pcem-386_dynarec_ops.Tpo -c -o pcem-386_dynarec_ops.obj `if test -f '386_dynarec_ops.c'; then $(CYGPATH_W) '386_dynarec_ops.c'; else $(CYGPATH_W) '$(srcdir)/386_dynarec_ops.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-386_dynarec_ops.Tpo $(DEPDIR)/pcem-386_dynarec_ops.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='386_dynarec_ops.c' object='pcem-386_dynarec_ops.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-386_dynarec_ops.obj `if test -f '386_dynarec_ops.c'; then $(CYGPATH_W) '386_dynarec_ops.c'; else $(CYGPATH_W) '$(srcdir)/386_dynarec_ops.c'; fi`
|
||||
|
||||
pcem-codegen.o: codegen.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen.o -MD -MP -MF $(DEPDIR)/pcem-codegen.Tpo -c -o pcem-codegen.o `test -f 'codegen.c' || echo '$(srcdir)/'`codegen.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-codegen.Tpo $(DEPDIR)/pcem-codegen.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codegen.c' object='pcem-codegen.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen.o `test -f 'codegen.c' || echo '$(srcdir)/'`codegen.c
|
||||
|
||||
pcem-codegen.obj: codegen.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen.obj -MD -MP -MF $(DEPDIR)/pcem-codegen.Tpo -c -o pcem-codegen.obj `if test -f 'codegen.c'; then $(CYGPATH_W) 'codegen.c'; else $(CYGPATH_W) '$(srcdir)/codegen.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-codegen.Tpo $(DEPDIR)/pcem-codegen.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codegen.c' object='pcem-codegen.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen.obj `if test -f 'codegen.c'; then $(CYGPATH_W) 'codegen.c'; else $(CYGPATH_W) '$(srcdir)/codegen.c'; fi`
|
||||
|
||||
pcem-codegen_ops.o: codegen_ops.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen_ops.o -MD -MP -MF $(DEPDIR)/pcem-codegen_ops.Tpo -c -o pcem-codegen_ops.o `test -f 'codegen_ops.c' || echo '$(srcdir)/'`codegen_ops.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-codegen_ops.Tpo $(DEPDIR)/pcem-codegen_ops.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codegen_ops.c' object='pcem-codegen_ops.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen_ops.o `test -f 'codegen_ops.c' || echo '$(srcdir)/'`codegen_ops.c
|
||||
|
||||
pcem-codegen_ops.obj: codegen_ops.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen_ops.obj -MD -MP -MF $(DEPDIR)/pcem-codegen_ops.Tpo -c -o pcem-codegen_ops.obj `if test -f 'codegen_ops.c'; then $(CYGPATH_W) 'codegen_ops.c'; else $(CYGPATH_W) '$(srcdir)/codegen_ops.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-codegen_ops.Tpo $(DEPDIR)/pcem-codegen_ops.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codegen_ops.c' object='pcem-codegen_ops.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen_ops.obj `if test -f 'codegen_ops.c'; then $(CYGPATH_W) 'codegen_ops.c'; else $(CYGPATH_W) '$(srcdir)/codegen_ops.c'; fi`
|
||||
|
||||
pcem-codegen_timing_486.o: codegen_timing_486.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen_timing_486.o -MD -MP -MF $(DEPDIR)/pcem-codegen_timing_486.Tpo -c -o pcem-codegen_timing_486.o `test -f 'codegen_timing_486.c' || echo '$(srcdir)/'`codegen_timing_486.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-codegen_timing_486.Tpo $(DEPDIR)/pcem-codegen_timing_486.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codegen_timing_486.c' object='pcem-codegen_timing_486.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen_timing_486.o `test -f 'codegen_timing_486.c' || echo '$(srcdir)/'`codegen_timing_486.c
|
||||
|
||||
pcem-codegen_timing_486.obj: codegen_timing_486.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen_timing_486.obj -MD -MP -MF $(DEPDIR)/pcem-codegen_timing_486.Tpo -c -o pcem-codegen_timing_486.obj `if test -f 'codegen_timing_486.c'; then $(CYGPATH_W) 'codegen_timing_486.c'; else $(CYGPATH_W) '$(srcdir)/codegen_timing_486.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-codegen_timing_486.Tpo $(DEPDIR)/pcem-codegen_timing_486.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codegen_timing_486.c' object='pcem-codegen_timing_486.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen_timing_486.obj `if test -f 'codegen_timing_486.c'; then $(CYGPATH_W) 'codegen_timing_486.c'; else $(CYGPATH_W) '$(srcdir)/codegen_timing_486.c'; fi`
|
||||
|
||||
pcem-codegen_timing_pentium.o: codegen_timing_pentium.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen_timing_pentium.o -MD -MP -MF $(DEPDIR)/pcem-codegen_timing_pentium.Tpo -c -o pcem-codegen_timing_pentium.o `test -f 'codegen_timing_pentium.c' || echo '$(srcdir)/'`codegen_timing_pentium.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-codegen_timing_pentium.Tpo $(DEPDIR)/pcem-codegen_timing_pentium.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codegen_timing_pentium.c' object='pcem-codegen_timing_pentium.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen_timing_pentium.o `test -f 'codegen_timing_pentium.c' || echo '$(srcdir)/'`codegen_timing_pentium.c
|
||||
|
||||
pcem-codegen_timing_pentium.obj: codegen_timing_pentium.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen_timing_pentium.obj -MD -MP -MF $(DEPDIR)/pcem-codegen_timing_pentium.Tpo -c -o pcem-codegen_timing_pentium.obj `if test -f 'codegen_timing_pentium.c'; then $(CYGPATH_W) 'codegen_timing_pentium.c'; else $(CYGPATH_W) '$(srcdir)/codegen_timing_pentium.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-codegen_timing_pentium.Tpo $(DEPDIR)/pcem-codegen_timing_pentium.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codegen_timing_pentium.c' object='pcem-codegen_timing_pentium.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen_timing_pentium.obj `if test -f 'codegen_timing_pentium.c'; then $(CYGPATH_W) 'codegen_timing_pentium.c'; else $(CYGPATH_W) '$(srcdir)/codegen_timing_pentium.c'; fi`
|
||||
|
||||
pcem-codegen_x86.o: codegen_x86.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen_x86.o -MD -MP -MF $(DEPDIR)/pcem-codegen_x86.Tpo -c -o pcem-codegen_x86.o `test -f 'codegen_x86.c' || echo '$(srcdir)/'`codegen_x86.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-codegen_x86.Tpo $(DEPDIR)/pcem-codegen_x86.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codegen_x86.c' object='pcem-codegen_x86.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen_x86.o `test -f 'codegen_x86.c' || echo '$(srcdir)/'`codegen_x86.c
|
||||
|
||||
pcem-codegen_x86.obj: codegen_x86.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen_x86.obj -MD -MP -MF $(DEPDIR)/pcem-codegen_x86.Tpo -c -o pcem-codegen_x86.obj `if test -f 'codegen_x86.c'; then $(CYGPATH_W) 'codegen_x86.c'; else $(CYGPATH_W) '$(srcdir)/codegen_x86.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pcem-codegen_x86.Tpo $(DEPDIR)/pcem-codegen_x86.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codegen_x86.c' object='pcem-codegen_x86.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen_x86.obj `if test -f 'codegen_x86.c'; then $(CYGPATH_W) 'codegen_x86.c'; else $(CYGPATH_W) '$(srcdir)/codegen_x86.c'; fi`
|
||||
|
||||
.cc.o:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@
|
|||
#include "codegen_ops.h"
|
||||
#include "codegen_ops_x86.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
x86seg *op_ea_seg;
|
||||
int op_ssegs;
|
||||
uint32_t op_old_pc;
|
||||
|
|
@ -49,13 +54,28 @@ static int last_ssegs;
|
|||
void codegen_init()
|
||||
{
|
||||
int c;
|
||||
#ifdef __linux__
|
||||
void *start;
|
||||
size_t len;
|
||||
long pagesize = sysconf(_SC_PAGESIZE);
|
||||
long pagemask = ~(pagesize - 1);
|
||||
#endif
|
||||
|
||||
codeblock = malloc(BLOCK_SIZE * sizeof(codeblock_t));
|
||||
codeblock_hash = malloc(HASH_SIZE * sizeof(codeblock_t *));
|
||||
|
||||
memset(codeblock, 0, BLOCK_SIZE * sizeof(codeblock_t));
|
||||
memset(codeblock_hash, 0, HASH_SIZE * sizeof(codeblock_t *));
|
||||
|
||||
|
||||
#ifdef __linux__
|
||||
start = (void *)((long)codeblock & pagemask);
|
||||
len = ((BLOCK_SIZE * sizeof(codeblock_t)) + pagesize) & pagemask;
|
||||
if (mprotect(start, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0)
|
||||
{
|
||||
perror("mprotect");
|
||||
exit(-1);
|
||||
}
|
||||
#endif
|
||||
// pclog("Codegen is %p\n", (void *)pages[0xfab12 >> 12].block);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
#ifndef _X86_OPS_H
|
||||
#define _X86_OPS_H
|
||||
|
||||
typedef int (*OpFn)(uint32_t fetchdat);
|
||||
|
||||
#ifdef DYNAREC
|
||||
|
|
@ -103,3 +106,5 @@ extern OpFn ops_fpu_df_a16[256];
|
|||
extern OpFn ops_fpu_df_a32[256];
|
||||
extern OpFn ops_nofpu_a16[256];
|
||||
extern OpFn ops_nofpu_a32[256];
|
||||
|
||||
#endif /*_X86_OPS_H*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue