<html>
<body>
  <div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src</tt></b></td></tr>
<tr><td><tt><a href="#file1">Makefile.am</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+1</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-1</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">aacaae9812ea -> 9dd5dee45db9</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file2">Makefile.in</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+82</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-67</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">aacaae9812ea -> 9dd5dee45db9</td></tr>
<tr><td><tt><a href="#file3">main.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+9</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-4</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">aacaae9812ea -> 9dd5dee45db9</td></tr>
<tr class="alt" style=";" ><td><tt>sh4/<a href="#file4">sh4.c</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+8</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-3</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">aacaae9812ea -> 9dd5dee45db9</td></tr>
<tr><td><tt>   /<a href="#file5">sh4.h</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+7</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-1</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">aacaae9812ea -> 9dd5dee45db9</td></tr>
<tr class="alt" style=";" ><td><tt>   /<a href="#file6">sh4core.in</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+6</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-4</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">aacaae9812ea -> 9dd5dee45db9</td></tr>
<tr><td><tt>   /<a href="#file7">sh4trans.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+5</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">aacaae9812ea -> 9dd5dee45db9</td></tr>
<tr class="alt" style=";" ><td><tt>   /<a href="#file8">sh4trans.h</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+23</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">aacaae9812ea -> 9dd5dee45db9</td></tr>
<tr><td><tt>   /<a href="#file9">sh4x86.in</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+60</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-9</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">aacaae9812ea -> 9dd5dee45db9</td></tr>
<tr class="alt" style=";" ><td><tt>xlat/x86/<a href="#file10">amd64abi.h</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+2</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-3</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">aacaae9812ea -> 9dd5dee45db9</td></tr>
<tr><td><tt>        /<a href="#file11">ia32abi.h</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+3</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-3</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">aacaae9812ea -> 9dd5dee45db9</td></tr>
<tr><td></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+206</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-95</td><td></td></tr>
</table>
<small id="info" style="color: #888888;" >11 modified files</small><br />
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Implement shadow-execution 'core' to run translator + interpreter side by
side (for testing)
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>Makefile.am</b></big> <small id="info" style="color: #888888;" >aacaae9812ea -> 9dd5dee45db9</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/Makefile.am
+++ lxdream/src/Makefile.am
@@ -52,7 +52,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         sh4/mmu.c sh4/sh4core.c sh4/sh4core.h sh4/sh4dasm.c sh4/sh4dasm.h \
         sh4/sh4mmio.c sh4/sh4mmio.h sh4/scif.c sh4/sh4stat.c sh4/sh4stat.h \
        xlat/xltcache.c xlat/xltcache.h sh4/sh4.h sh4/dmac.h sh4/pmm.c \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   sh4/cache.c sh4/mmu.h \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     sh4/cache.c sh4/mmu.h sh4/shadow.c \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         aica/armcore.c aica/armcore.h aica/armdasm.c aica/armdasm.h aica/armmem.c \
         aica/aica.c aica/aica.h aica/audio.c aica/audio.h \
        pvr2/pvr2.c pvr2/pvr2.h pvr2/pvr2mem.c pvr2/pvr2mmio.h \
</pre></div>
<hr /><a name="file2" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>Makefile.in</b></big> <small id="info" style="color: #888888;" >aacaae9812ea -> 9dd5dee45db9</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/Makefile.in
+++ lxdream/src/Makefile.in
@@ -152,13 +152,13 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >      sh4/sh4core.h sh4/sh4dasm.c sh4/sh4dasm.h sh4/sh4mmio.c \
        sh4/sh4mmio.h sh4/scif.c sh4/sh4stat.c sh4/sh4stat.h \
        xlat/xltcache.c xlat/xltcache.h sh4/sh4.h sh4/dmac.h sh4/pmm.c \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   sh4/cache.c sh4/mmu.h aica/armcore.c aica/armcore.h \
-       aica/armdasm.c aica/armdasm.h aica/armmem.c aica/aica.c \
-       aica/aica.h aica/audio.c aica/audio.h pvr2/pvr2.c pvr2/pvr2.h \
-       pvr2/pvr2mem.c pvr2/pvr2mmio.h pvr2/tacore.c pvr2/rendsort.c \
-       pvr2/texcache.c pvr2/yuv.c pvr2/rendsave.c pvr2/scene.c \
-       pvr2/scene.h pvr2/gl_sl.c pvr2/gl_slsrc.c pvr2/glutil.c \
-       pvr2/glutil.h pvr2/glrender.c pvr2/vertex.glsl \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     sh4/cache.c sh4/mmu.h sh4/shadow.c aica/armcore.c \
+       aica/armcore.h aica/armdasm.c aica/armdasm.h aica/armmem.c \
+       aica/aica.c aica/aica.h aica/audio.c aica/audio.h pvr2/pvr2.c \
+       pvr2/pvr2.h pvr2/pvr2mem.c pvr2/pvr2mmio.h pvr2/tacore.c \
+       pvr2/rendsort.c pvr2/texcache.c pvr2/yuv.c pvr2/rendsave.c \
+       pvr2/scene.c pvr2/scene.h pvr2/gl_sl.c pvr2/gl_slsrc.c \
+       pvr2/glutil.c pvr2/glutil.h pvr2/glrender.c pvr2/vertex.glsl \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >    pvr2/fragment.glsl maple/maple.c maple/maple.h \
        maple/controller.c maple/kbd.c maple/mouse.c maple/lightgun.c \
        maple/vmu.c loader.c loader.h elf.h bootstrap.c bootstrap.h \
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -257,35 +257,35 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >      lxdream-sh4mmio.$(OBJEXT) lxdream-scif.$(OBJEXT) \
        lxdream-sh4stat.$(OBJEXT) lxdream-xltcache.$(OBJEXT) \
        lxdream-pmm.$(OBJEXT) lxdream-cache.$(OBJEXT) \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   lxdream-armcore.$(OBJEXT) lxdream-armdasm.$(OBJEXT) \
-       lxdream-armmem.$(OBJEXT) lxdream-aica.$(OBJEXT) \
-       lxdream-audio.$(OBJEXT) lxdream-pvr2.$(OBJEXT) \
-       lxdream-pvr2mem.$(OBJEXT) lxdream-tacore.$(OBJEXT) \
-       lxdream-rendsort.$(OBJEXT) lxdream-texcache.$(OBJEXT) \
-       lxdream-yuv.$(OBJEXT) lxdream-rendsave.$(OBJEXT) \
-       lxdream-scene.$(OBJEXT) lxdream-gl_sl.$(OBJEXT) \
-       lxdream-gl_slsrc.$(OBJEXT) lxdream-glutil.$(OBJEXT) \
-       lxdream-glrender.$(OBJEXT) lxdream-maple.$(OBJEXT) \
-       lxdream-controller.$(OBJEXT) lxdream-kbd.$(OBJEXT) \
-       lxdream-mouse.$(OBJEXT) lxdream-lightgun.$(OBJEXT) \
-       lxdream-vmu.$(OBJEXT) lxdream-loader.$(OBJEXT) \
-       lxdream-bootstrap.$(OBJEXT) lxdream-util.$(OBJEXT) \
-       lxdream-gdlist.$(OBJEXT) lxdream-vmuvol.$(OBJEXT) \
-       lxdream-vmulist.$(OBJEXT) lxdream-display.$(OBJEXT) \
-       lxdream-audio_null.$(OBJEXT) lxdream-video_null.$(OBJEXT) \
-       lxdream-video_gl.$(OBJEXT) lxdream-gl_fbo.$(OBJEXT) \
-       lxdream-serial_unix.$(OBJEXT) lxdream-cdrom.$(OBJEXT) \
-       lxdream-sector.$(OBJEXT) lxdream-cd_nrg.$(OBJEXT) \
-       lxdream-cd_cdi.$(OBJEXT) lxdream-cd_gdi.$(OBJEXT) \
-       lxdream-edc_ecc.$(OBJEXT) lxdream-drive.$(OBJEXT) \
-       lxdream-cd_mmc.$(OBJEXT) lxdream-isofs.$(OBJEXT) \
-       lxdream-hotkeys.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
-       $(am__objects_3) $(am__objects_4) $(am__objects_5) \
-       $(am__objects_6) $(am__objects_7) $(am__objects_8) \
-       $(am__objects_9) $(am__objects_10) $(am__objects_11) \
-       $(am__objects_12) $(am__objects_13) $(am__objects_14) \
-       $(am__objects_15) $(am__objects_16) $(am__objects_17) \
-       $(am__objects_18)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     lxdream-shadow.$(OBJEXT) lxdream-armcore.$(OBJEXT) \
+       lxdream-armdasm.$(OBJEXT) lxdream-armmem.$(OBJEXT) \
+       lxdream-aica.$(OBJEXT) lxdream-audio.$(OBJEXT) \
+       lxdream-pvr2.$(OBJEXT) lxdream-pvr2mem.$(OBJEXT) \
+       lxdream-tacore.$(OBJEXT) lxdream-rendsort.$(OBJEXT) \
+       lxdream-texcache.$(OBJEXT) lxdream-yuv.$(OBJEXT) \
+       lxdream-rendsave.$(OBJEXT) lxdream-scene.$(OBJEXT) \
+       lxdream-gl_sl.$(OBJEXT) lxdream-gl_slsrc.$(OBJEXT) \
+       lxdream-glutil.$(OBJEXT) lxdream-glrender.$(OBJEXT) \
+       lxdream-maple.$(OBJEXT) lxdream-controller.$(OBJEXT) \
+       lxdream-kbd.$(OBJEXT) lxdream-mouse.$(OBJEXT) \
+       lxdream-lightgun.$(OBJEXT) lxdream-vmu.$(OBJEXT) \
+       lxdream-loader.$(OBJEXT) lxdream-bootstrap.$(OBJEXT) \
+       lxdream-util.$(OBJEXT) lxdream-gdlist.$(OBJEXT) \
+       lxdream-vmuvol.$(OBJEXT) lxdream-vmulist.$(OBJEXT) \
+       lxdream-display.$(OBJEXT) lxdream-audio_null.$(OBJEXT) \
+       lxdream-video_null.$(OBJEXT) lxdream-video_gl.$(OBJEXT) \
+       lxdream-gl_fbo.$(OBJEXT) lxdream-serial_unix.$(OBJEXT) \
+       lxdream-cdrom.$(OBJEXT) lxdream-sector.$(OBJEXT) \
+       lxdream-cd_nrg.$(OBJEXT) lxdream-cd_cdi.$(OBJEXT) \
+       lxdream-cd_gdi.$(OBJEXT) lxdream-edc_ecc.$(OBJEXT) \
+       lxdream-drive.$(OBJEXT) lxdream-cd_mmc.$(OBJEXT) \
+       lxdream-isofs.$(OBJEXT) lxdream-hotkeys.$(OBJEXT) \
+       $(am__objects_1) $(am__objects_2) $(am__objects_3) \
+       $(am__objects_4) $(am__objects_5) $(am__objects_6) \
+       $(am__objects_7) $(am__objects_8) $(am__objects_9) \
+       $(am__objects_10) $(am__objects_11) $(am__objects_12) \
+       $(am__objects_13) $(am__objects_14) $(am__objects_15) \
+       $(am__objects_16) $(am__objects_17) $(am__objects_18)
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > lxdream_OBJECTS = $(am_lxdream_OBJECTS)
 lxdream_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -571,37 +571,37 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >      sh4/sh4dasm.h sh4/sh4mmio.c sh4/sh4mmio.h sh4/scif.c \
        sh4/sh4stat.c sh4/sh4stat.h xlat/xltcache.c xlat/xltcache.h \
        sh4/sh4.h sh4/dmac.h sh4/pmm.c sh4/cache.c sh4/mmu.h \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   aica/armcore.c aica/armcore.h aica/armdasm.c aica/armdasm.h \
-       aica/armmem.c aica/aica.c aica/aica.h aica/audio.c \
-       aica/audio.h pvr2/pvr2.c pvr2/pvr2.h pvr2/pvr2mem.c \
-       pvr2/pvr2mmio.h pvr2/tacore.c pvr2/rendsort.c pvr2/texcache.c \
-       pvr2/yuv.c pvr2/rendsave.c pvr2/scene.c pvr2/scene.h \
-       pvr2/gl_sl.c pvr2/gl_slsrc.c pvr2/glutil.c pvr2/glutil.h \
-       pvr2/glrender.c pvr2/vertex.glsl pvr2/fragment.glsl \
-       maple/maple.c maple/maple.h maple/controller.c maple/kbd.c \
-       maple/mouse.c maple/lightgun.c maple/vmu.c loader.c loader.h \
-       elf.h bootstrap.c bootstrap.h util.c gdlist.c gdlist.h \
-       vmu/vmuvol.c vmu/vmuvol.h vmu/vmulist.c vmu/vmulist.h \
-       display.c display.h dckeysyms.h drivers/audio_null.c \
-       drivers/video_null.c drivers/video_gl.c drivers/video_gl.h \
-       drivers/gl_fbo.c drivers/serial_unix.c drivers/cdrom/cdrom.h \
-       drivers/cdrom/cdrom.c drivers/cdrom/drive.h \
-       drivers/cdrom/sector.h drivers/cdrom/sector.c \
-       drivers/cdrom/defs.h drivers/cdrom/cd_nrg.c \
-       drivers/cdrom/cd_cdi.c drivers/cdrom/cd_gdi.c \
-       drivers/cdrom/edc_ecc.c drivers/cdrom/ecc.h \
-       drivers/cdrom/drive.c drivers/cdrom/edc_crctable.h \
-       drivers/cdrom/edc_encoder.h drivers/cdrom/edc_l2sq.h \
-       drivers/cdrom/edc_scramble.h drivers/cdrom/cd_mmc.c \
-       drivers/cdrom/isofs.h drivers/cdrom/isofs.c sh4/sh4.def \
-       sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in \
-       hotkeys.c hotkeys.h $(am__append_1) $(am__append_2) \
-       $(am__append_4) $(am__append_5) $(am__append_6) \
-       $(am__append_7) $(am__append_8) $(am__append_9) \
-       $(am__append_10) $(am__append_17) $(am__append_19) \
-       $(am__append_21) $(am__append_23) $(am__append_25) \
-       $(am__append_27) $(am__append_28) $(am__append_29) \
-       $(am__append_30)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     sh4/shadow.c aica/armcore.c aica/armcore.h aica/armdasm.c \
+       aica/armdasm.h aica/armmem.c aica/aica.c aica/aica.h \
+       aica/audio.c aica/audio.h pvr2/pvr2.c pvr2/pvr2.h \
+       pvr2/pvr2mem.c pvr2/pvr2mmio.h pvr2/tacore.c pvr2/rendsort.c \
+       pvr2/texcache.c pvr2/yuv.c pvr2/rendsave.c pvr2/scene.c \
+       pvr2/scene.h pvr2/gl_sl.c pvr2/gl_slsrc.c pvr2/glutil.c \
+       pvr2/glutil.h pvr2/glrender.c pvr2/vertex.glsl \
+       pvr2/fragment.glsl maple/maple.c maple/maple.h \
+       maple/controller.c maple/kbd.c maple/mouse.c maple/lightgun.c \
+       maple/vmu.c loader.c loader.h elf.h bootstrap.c bootstrap.h \
+       util.c gdlist.c gdlist.h vmu/vmuvol.c vmu/vmuvol.h \
+       vmu/vmulist.c vmu/vmulist.h display.c display.h dckeysyms.h \
+       drivers/audio_null.c drivers/video_null.c drivers/video_gl.c \
+       drivers/video_gl.h drivers/gl_fbo.c drivers/serial_unix.c \
+       drivers/cdrom/cdrom.h drivers/cdrom/cdrom.c \
+       drivers/cdrom/drive.h drivers/cdrom/sector.h \
+       drivers/cdrom/sector.c drivers/cdrom/defs.h \
+       drivers/cdrom/cd_nrg.c drivers/cdrom/cd_cdi.c \
+       drivers/cdrom/cd_gdi.c drivers/cdrom/edc_ecc.c \
+       drivers/cdrom/ecc.h drivers/cdrom/drive.c \
+       drivers/cdrom/edc_crctable.h drivers/cdrom/edc_encoder.h \
+       drivers/cdrom/edc_l2sq.h drivers/cdrom/edc_scramble.h \
+       drivers/cdrom/cd_mmc.c drivers/cdrom/isofs.h \
+       drivers/cdrom/isofs.c sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in \
+       sh4/sh4dasm.in sh4/sh4stat.in hotkeys.c hotkeys.h \
+       $(am__append_1) $(am__append_2) $(am__append_4) \
+       $(am__append_5) $(am__append_6) $(am__append_7) \
+       $(am__append_8) $(am__append_9) $(am__append_10) \
+       $(am__append_17) $(am__append_19) $(am__append_21) \
+       $(am__append_23) $(am__append_25) $(am__append_27) \
+       $(am__append_28) $(am__append_29) $(am__append_30)
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > lxdream_CPPFLAGS = @LXDREAMCPPFLAGS@
 @BUILD_SH4X86_TRUE@test_testsh4x86_LDADD = @LXDREAM_LIBS@ @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@
 @BUILD_SH4X86_TRUE@test_testsh4x86_CPPFLAGS = @LXDREAMCPPFLAGS@
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -870,6 +870,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-sh4stat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-sh4trans.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-sh4x86.Po@am__quote@
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-shadow.Po@am__quote@
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-syscall.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-tacore.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-texcache.Po@am__quote@
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -1452,6 +1453,20 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-cache.obj `if test -f 'sh4/cache.c'; then $(CYGPATH_W) 'sh4/cache.c'; else $(CYGPATH_W) '$(srcdir)/sh4/cache.c'; fi`
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+lxdream-shadow.o: sh4/shadow.c
+@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-shadow.o -MD -MP -MF "$(DEPDIR)/lxdream-shadow.Tpo" -c -o lxdream-shadow.o `test -f 'sh4/shadow.c' || echo '$(srcdir)/'`sh4/shadow.c; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-shadow.Tpo" "$(DEPDIR)/lxdream-shadow.Po"; else rm -f "$(DEPDIR)/lxdream-shadow.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sh4/shadow.c' object='lxdream-shadow.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-shadow.o `test -f 'sh4/shadow.c' || echo '$(srcdir)/'`sh4/shadow.c
+
+lxdream-shadow.obj: sh4/shadow.c
+@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-shadow.obj -MD -MP -MF "$(DEPDIR)/lxdream-shadow.Tpo" -c -o lxdream-shadow.obj `if test -f 'sh4/shadow.c'; then $(CYGPATH_W) 'sh4/shadow.c'; else $(CYGPATH_W) '$(srcdir)/sh4/shadow.c'; fi`; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-shadow.Tpo" "$(DEPDIR)/lxdream-shadow.Po"; else rm -f "$(DEPDIR)/lxdream-shadow.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sh4/shadow.c' object='lxdream-shadow.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-shadow.obj `if test -f 'sh4/shadow.c'; then $(CYGPATH_W) 'sh4/shadow.c'; else $(CYGPATH_W) '$(srcdir)/sh4/shadow.c'; fi`
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > lxdream-armcore.o: aica/armcore.c
 @am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-armcore.o -MD -MP -MF "$(DEPDIR)/lxdream-armcore.Tpo" -c -o lxdream-armcore.o `test -f 'aica/armcore.c' || echo '$(srcdir)/'`aica/armcore.c; \
 @am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-armcore.Tpo" "$(DEPDIR)/lxdream-armcore.Po"; else rm -f "$(DEPDIR)/lxdream-armcore.Tpo"; exit 1; fi
</pre></div>
<hr /><a name="file3" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>main.c</b></big> <small id="info" style="color: #888888;" >aacaae9812ea -> 9dd5dee45db9</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/main.c
+++ lxdream/src/main.c
@@ -42,7 +42,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "hotkeys.h"
 #include "plugin.h"
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-char *option_list = "a:A:bc:e:dfg:G:hHl:m:npt:T:uvV:x?";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+char *option_list = "a:A:bc:e:dfg:G:hHl:m:npt:T:uvV:x<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >X</span>?";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > struct option longopts[] = {
         { "aica", required_argument, NULL, 'a' },
         { "audio", required_argument, NULL, 'A' },
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -58,6 +58,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         { "log", required_argument, NULL,'l' }, 
         { "multiplier", required_argument, NULL, 'm' },
         { "run-time", required_argument, NULL, 't' },
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        { "shadow", no_argument, NULL, 'X' },
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         { "trace", required_argument, NULL, 'T' },
         { "unsafe", no_argument, NULL, 'u' },
         { "video", no_argument, NULL, 'V' },
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -72,7 +73,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > gboolean start_immediately = FALSE;
 gboolean no_start = FALSE;
 gboolean headless = FALSE;
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-gboolean use_xlat = TRUE;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+sh4core_t sh4_core = SH4_TRANSLATE;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > gboolean show_debugger = FALSE;
 gboolean show_fullscreen = FALSE;
 gboolean use_bootrom = TRUE;
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -110,6 +111,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     printf( "   -v, --version          %s\n", _("Print the lxdream version string") );
     printf( "   -V, --video=DRIVER     %s\n", _("Use the specified video driver (? to list)") );
     printf( "   -x                     %s\n", _("Disable the SH4 translator") );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    printf( "   -X                     %s\n", _("Run both SH4 interpreter and translator") );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
 
 static void bind_gettext_domain()
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -207,7 +209,10 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             display_driver_name = optarg;
             break;
         case 'x': /* Disable translator */
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-            use_xlat = FALSE;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+            sh4_core = SH4_INTERPRET;
+            break;
+        case 'X': /* Shadow translator */
+            sh4_core = SH4_SHADOW;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             break;
         }
     }
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -321,7 +326,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         }
     }
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    sh4_translate_set_enabled( use_xlat );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    sh4_set_core( sh4_core );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
     /* If requested, start the gdb server immediately before we go into the main
      * loop.
</pre></div>
<hr /><a name="file4" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/sh4</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>sh4.c</b></big> <small id="info" style="color: #888888;" >aacaae9812ea -> 9dd5dee45db9</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/sh4/sh4.c
+++ lxdream/src/sh4/sh4.c
@@ -160,14 +160,19 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
 }
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-void sh4_translate_set_enabled( gboolean use )
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void sh4_set_core( sh4core_t core )
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
     // No-op if the translator was not built
 #ifdef SH4_TRANSLATOR
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    if( use ) {
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    if( core != SH4_INTERPRET ) {
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         sh4_translate_init();
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        sh4_use_translator = TRUE;
+        if( core == SH4_SHADOW ) {
+            sh4_shadow_init();
+        }
+    } else {
+        sh4_use_translator = FALSE;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     }
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    sh4_use_translator = use;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #endif
 }
 
</pre></div>
<hr /><a name="file5" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/sh4</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>sh4.h</b></big> <small id="info" style="color: #888888;" >aacaae9812ea -> 9dd5dee45db9</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/sh4/sh4.h
+++ lxdream/src/sh4/sh4.h
@@ -97,6 +97,12 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 extern const struct cpu_desc_struct sh4_cpu_desc;
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+typedef enum {
+    SH4_INTERPRET,
+    SH4_TRANSLATE,
+    SH4_SHADOW
+} sh4core_t;
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /**
  * Switch between translation and emulation execution modes. Note that this
  * should only be used while the system is stopped. If the system was built
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -104,7 +110,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  *
  * @param use TRUE for translation mode, FALSE for emulation mode.
  */
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-void sh4_translate_set_enabled( gboolean use );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void sh4_set_core( sh4core_t core );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 /**
  * Test if system is currently using the translation engine.
</pre></div>
<hr /><a name="file6" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/sh4</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>sh4core.in</b></big> <small id="info" style="color: #888888;" >aacaae9812ea -> 9dd5dee45db9</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/sh4/sh4core.in
+++ lxdream/src/sh4/sh4core.in
@@ -178,6 +178,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > static FASTCALL __attribute__((noinline)) void *__first_arg(void *a, void *b) { return a; }
 #define INIT_EXCEPTIONS(label) goto *__first_arg(&&fnstart,&&label); fnstart:
 #define MEM_READ_BYTE( addr, val ) val = ((mem_read_exc_fn_t)ADDRSPACE[(addr)>>12]->read_byte)((addr), &&except)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define MEM_READ_BYTE_FOR_WRITE( addr, val ) val = ((mem_read_exc_fn_t)ADDRSPACE[(addr)>>12]->read_byte_for_write)((addr), &&except)
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define MEM_READ_WORD( addr, val ) val = ((mem_read_exc_fn_t)ADDRSPACE[(addr)>>12]->read_word)((addr), &&except)
 #define MEM_READ_LONG( addr, val ) val = ((mem_read_exc_fn_t)ADDRSPACE[(addr)>>12]->read_long)((addr), &&except)
 #define MEM_WRITE_BYTE( addr, val ) ((mem_write_exc_fn_t)ADDRSPACE[(addr)>>12]->write_byte)((addr), (val), &&except)
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -187,6 +188,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #else
 #define INIT_EXCEPTIONS(label)
 #define MEM_READ_BYTE( addr, val ) val = ADDRSPACE[(addr)>>12]->read_byte(addr)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define MEM_READ_BYTE_FOR_WRITE( addr, val ) val = ADDRSPACE[(addr)>>12]->read_byte_for_write(addr)
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define MEM_READ_WORD( addr, val ) val = ADDRSPACE[(addr)>>12]->read_word(addr)
 #define MEM_READ_LONG( addr, val ) val = ADDRSPACE[(addr)>>12]->read_long(addr)
 #define MEM_WRITE_BYTE( addr, val ) ADDRSPACE[(addr)>>12]->write_byte(addr, val)
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -406,13 +408,13 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > %%
 AND Rm, Rn {: sh4r.r[Rn] &= sh4r.r[Rm]; :}
 AND #imm, R0 {: R0 &= imm; :}
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- AND.B #imm, @(R0, GBR) {: MEM_READ_BYTE(R0+sh4r.gbr, tmp); MEM_WRITE_BYTE( R0 + sh4r.gbr, imm & tmp ); :}
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ AND.B #imm, @(R0, GBR) {: MEM_READ_BYTE<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >_FOR_WRITE</span>(R0+sh4r.gbr, tmp); MEM_WRITE_BYTE( R0 + sh4r.gbr, imm & tmp ); :}
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > NOT Rm, Rn {: sh4r.r[Rn] = ~sh4r.r[Rm]; :}
 OR Rm, Rn {: sh4r.r[Rn] |= sh4r.r[Rm]; :}
 OR #imm, R0  {: R0 |= imm; :}
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- OR.B #imm, @(R0, GBR) {: MEM_READ_BYTE(R0+sh4r.gbr, tmp); MEM_WRITE_BYTE( R0 + sh4r.gbr, imm | tmp ); :}
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ OR.B #imm, @(R0, GBR) {: MEM_READ_BYTE<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >_FOR_WRITE</span>(R0+sh4r.gbr, tmp); MEM_WRITE_BYTE( R0 + sh4r.gbr, imm | tmp ); :}
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > TAS.B @Rn {:
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    MEM_READ_BYTE( sh4r.r[Rn], tmp );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    MEM_READ_BYTE<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >_FOR_WRITE</span>( sh4r.r[Rn], tmp );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     sh4r.t = ( tmp == 0 ? 1 : 0 );
     MEM_WRITE_BYTE( sh4r.r[Rn], tmp | 0x80 );
 :}
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -421,7 +423,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  TST.B #imm, @(R0, GBR) {: MEM_READ_BYTE(R0+sh4r.gbr, tmp); sh4r.t = ( tmp & imm ? 0 : 1 ); :}
 XOR Rm, Rn {: sh4r.r[Rn] ^= sh4r.r[Rm]; :}
 XOR #imm, R0 {: R0 ^= imm; :}
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- XOR.B #imm, @(R0, GBR) {: MEM_READ_BYTE(R0+sh4r.gbr, tmp); MEM_WRITE_BYTE( R0 + sh4r.gbr, imm ^ tmp ); :}
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ XOR.B #imm, @(R0, GBR) {: MEM_READ_BYTE<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >_FOR_WRITE</span>(R0+sh4r.gbr, tmp); MEM_WRITE_BYTE( R0 + sh4r.gbr, imm ^ tmp ); :}
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > XTRCT Rm, Rn {: sh4r.r[Rn] = (sh4r.r[Rn]>>16) | (sh4r.r[Rm]<<16); :}
 
 ROTL Rn {:
</pre></div>
<hr /><a name="file7" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/sh4</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>sh4trans.c</b></big> <small id="info" style="color: #888888;" >aacaae9812ea -> 9dd5dee45db9</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/sh4/sh4trans.c
+++ lxdream/src/sh4/sh4trans.c
@@ -27,6 +27,8 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "sh4/mmu.h"
 #include "xlat/xltcache.h"
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+//#define SINGLESTEP 1
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /**
  * Execute a timeslice using translated code only (ie translate/execute loop)
  */
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -113,6 +115,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         if ( pc >= lastpc ) {
             done = 2;
         }
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#ifdef SINGLESTEP
+        if( !done ) done = 2;
+#endif
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     } while( !done );
     pc += (done - 2);
 
</pre></div>
<hr /><a name="file8" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/sh4</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>sh4trans.h</b></big> <small id="info" style="color: #888888;" >aacaae9812ea -> 9dd5dee45db9</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/sh4/sh4trans.h
+++ lxdream/src/sh4/sh4trans.h
@@ -41,6 +41,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  */
 #define MAX_RECOVERY_SIZE 2049
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+typedef void (*xlat_block_begin_callback_t)();
+typedef void (*xlat_block_end_callback_t)();
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /**
  */
 uint32_t sh4_translate_run_slice( uint32_t nanosecs );
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -63,6 +66,11 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  */
 void sh4_translate_add_recovery( uint32_t icount );
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+/**
+ * Initialize shadow execution mode
+ */
+void sh4_shadow_init( void );
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > extern uint8_t *xlat_output;
 extern struct xlat_recovery_record xlat_recovery[MAX_RECOVERY_SIZE];
 extern xlat_cache_block_t xlat_current_block;
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -85,6 +93,21 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > typedef void (*unwind_thunk_t)(void);
 
 /**
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ * Set instrumentation callbacks
+ */
+void sh4_translate_set_callbacks( xlat_block_begin_callback_t begin, xlat_block_end_callback_t end );
+
+/**
+ * Enable/disable memory optimizations that bypass the mmu
+ */
+void sh4_translate_set_fastmem( gboolean flag );
+
+/**
+ * Set the address spaces for the translated code.
+ */
+void sh4_translate_set_address_space( struct mem_region_fn **priv, struct mem_region_fn **user );
+
+/**
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  * From within the translator, (typically called from MMU exception handling routines)
  * immediately exit the current translation block (performing cleanup as necessary) and
  * return to sh4_translate_run_slice(). Effectively a fast longjmp w/ xlat recovery.
</pre></div>
<hr /><a name="file9" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/sh4</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>sh4x86.in</b></big> <small id="info" style="color: #888888;" >aacaae9812ea -> 9dd5dee45db9</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/sh4/sh4x86.in
+++ lxdream/src/sh4/sh4x86.in
@@ -97,9 +97,16 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     uint32_t sh4_mode;     /* Mirror of sh4r.xlat_sh4_mode */
     int tstate;
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    /* mode <span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >fla</span>gs */
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    /* mode <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >settin</span>gs */
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     gboolean tlb_on; /* True if tlb translation is active */
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    struct mem_region_fn **priv_address_space;
+    struct mem_region_fn **user_address_space;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    /* Instrumentation */
+    xlat_block_begin_callback_t begin_callback;
+    xlat_block_end_callback_t end_callback;
+    gboolean fastmem;
+    
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     /* Allocated memory for the (block-wide) back-patch list */
     struct backpatch_record *backpatch_list;
     uint32_t backpatch_posn;
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -117,8 +124,8 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     { "sh4r+128", ((char *)&sh4r)+128 },
     { "sh4_cpu_period", &sh4_cpu_period },
     { "sh4_address_space", NULL },
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    { "sh4_user_address_space", NULL },
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     { "sh4_translate_breakpoint_hit", sh4_translate_breakpoint_hit },
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    { "sh4_user_address_space", NULL },
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     { "sh4_write_fpscr", sh4_write_fpscr },
     { "sh4_write_sr", sh4_write_sr },
     { "sh4_read_sr", sh4_read_sr },
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -143,17 +150,38 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     return (features & 1) ? TRUE : FALSE;
 }
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void sh4_translate_set_address_space( struct mem_region_fn **priv, struct mem_region_fn **user )
+{
+    sh4_x86.priv_address_space = priv;
+    sh4_x86.user_address_space = user;
+    x86_symbol_table[2].ptr = priv;
+    x86_symbol_table[3].ptr = user;
+}
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > void sh4_translate_init(void)
 {
     sh4_x86.backpatch_list = malloc(DEFAULT_BACKPATCH_SIZE);
     sh4_x86.backpatch_size = DEFAULT_BACKPATCH_SIZE / sizeof(struct backpatch_record);
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    sh4_x86.begin_callback = NULL;
+    sh4_x86.end_callback = NULL;
+    sh4_translate_set_address_space( sh4_address_space, sh4_user_address_space );
+    sh4_x86.fastmem = TRUE;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     sh4_x86.sse3_enabled = is_sse3_supported();
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    x86_symbol_table[2].ptr = sh4_address_space;
-    x86_symbol_table[3].ptr = sh4_user_address_space;    
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     x86_disasm_init();
     x86_set_symtab( x86_symbol_table, sizeof(x86_symbol_table)/sizeof(struct x86_symbol) );
 }
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void sh4_translate_set_callbacks( xlat_block_begin_callback_t begin, xlat_block_end_callback_t end )
+{
+    sh4_x86.begin_callback = begin;
+    sh4_x86.end_callback = end;
+}
+
+void sh4_translate_set_fastmem( gboolean flag )
+{
+    sh4_x86.fastmem = flag;
+}
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /**
  * Disassemble the given translated code block, and it's source SH4 code block
  * side-by-side. The current native pc will be marked if non-null.
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -371,7 +399,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     TESTL_imms_r32( 0x00000007, x86reg ); \
     JNE_exc(EXC_DATA_ADDR_WRITE);
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#define address_space() ((sh4_x86.sh4_mode&SR_MD) ? (uintptr_t)sh4_<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >address_space : (uintptr_t)sh4_</span>user_address_space)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define address_space() ((sh4_x86.sh4_mode&SR_MD) ? (uintptr_t)sh4_<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >x86.priv_address_space : (uintptr_t)sh4_x86.</span>user_address_space)
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 #define UNDEF(ir)
 /* Note: For SR.MD == 1 && MMUCR.AT == 0, there are no memory exceptions, so 
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -461,7 +489,10 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     sh4_x86.double_prec = sh4r.fpscr & FPSCR_PR;
     sh4_x86.double_size = sh4r.fpscr & FPSCR_SZ;
     sh4_x86.sh4_mode = sh4r.xlat_sh4_mode;
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    enter_block();
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    emit_prologue();
+    if( sh4_x86.begin_callback ) {
+        CALL_ptr( sh4_x86.begin_callback );
+    }
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
 
 
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -508,10 +539,30 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >      }
        JNE_label(wrongmode);
        LEAP_rptrdisp_rptr(REG_EAX, PROLOGUE_SIZE,REG_EAX);
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   JMP_rptr(REG_EAX);
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     if( sh4_x86.end_callback ) {
+           /* Note this does leave the stack out of alignment, but doesn't matter
+            * for what we're currently using it for.
+            */
+           PUSH_r32(REG_EAX);
+           MOVP_immptr_rptr(sh4_x86.end_callback, REG_ECX);
+           JMP_rptr(REG_ECX);
+       } else {
+           JMP_rptr(REG_EAX);
+       }
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >    JMP_TARGET(nocode); JMP_TARGET(wrongmode);
 }
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+static void exit_block()
+{
+       emit_epilogue();
+       if( sh4_x86.end_callback ) {
+           MOVP_immptr_rptr(sh4_x86.end_callback, REG_ECX);
+           JMP_rptr(REG_ECX);
+       } else {
+           RET();
+       }
+}
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /**
  * Exit the block with sh4r.pc already written
  */
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -1616,7 +1667,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >      SLOTILLEGAL();
     } else {
        uint32_t target = (pc & 0xFFFFFFFC) + disp + 4;
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   if( IS_IN_ICACHE(target) ) {
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     if( sh4_x86.fastmem && IS_IN_ICACHE(target) ) {
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >        // If the target address is in the same page as the code, it's
            // pretty safe to just ref it directly and circumvent the whole
            // memory subsystem. (this is a big performance win)
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -1738,7 +1789,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     } else {
        // See comments for MOV.L @(disp, PC), Rn
        uint32_t target = pc + disp + 4;
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   if( IS_IN_ICACHE(target) ) {
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     if( sh4_x86.fastmem && IS_IN_ICACHE(target) ) {
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >        sh4ptr_t ptr = GET_ICACHE_PTR(target);
            MOVL_moffptr_eax( ptr );
            MOVSXL_r16_r32( REG_EAX, REG_EAX );
</pre></div>
<hr /><a name="file10" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/xlat/x86</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>amd64abi.h</b></big> <small id="info" style="color: #888888;" >aacaae9812ea -> 9dd5dee45db9</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/xlat/x86/amd64abi.h
+++ lxdream/src/xlat/x86/amd64abi.h
@@ -100,16 +100,15 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  * Emit the 'start of block' assembly. Sets up the stack frame and save
  * SI/DI as required
  */
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-static inline void enter_block( ) 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+static inline void emit_prologue( )
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
     PUSH_r32(REG_RBP);
     SUBQ_imms_r64( 16, REG_RSP ); 
     MOVP_immptr_rptr( ((uint8_t *)&sh4r) + 128, REG_EBP );
 }
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-static inline void e<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >xit_block</span>( )
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+static inline void e<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >mit_epilogue</span>( )
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
     ADDQ_imms_r64( 16, REG_RSP );
     POP_r32(REG_RBP);
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    RET();
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
</pre></div>
<hr /><a name="file11" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/xlat/x86</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>ia32abi.h</b></big> <small id="info" style="color: #888888;" >aacaae9812ea -> 9dd5dee45db9</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/xlat/x86/ia32abi.h
+++ lxdream/src/xlat/x86/ia32abi.h
@@ -140,16 +140,16 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  * Allocates 8 bytes for local variables, which also has the convenient
  * side-effect of aligning the stack.
  */
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-static inline void enter_block( ) 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+static inline void emit_prologue( )
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
     PUSH_r32(REG_EBP);
     SUBL_imms_r32( 8, REG_ESP ); 
     MOVP_immptr_rptr( ((uint8_t *)&sh4r) + 128, REG_EBP );
 }
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-static inline void e<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >xit_block</span>( )
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+static inline void e<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >mit_epilogue</span>( )
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
     ADDL_imms_r32( 8, REG_ESP );
     POP_r32(REG_EBP);
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    RET();
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>