From 0827972636a15807c4fda39fd96f94109e2ad652 Mon Sep 17 00:00:00 2001 From: saqibakhtar Date: Mon, 14 Jul 2008 06:51:11 +0000 Subject: [PATCH] --- pcsx2v2/DebugTools/Makefile.am | 7 - pcsx2v2/IPU/Makefile.am | 8 - pcsx2v2/IPU/mpeg2lib/Makefile.am | 4 - pcsx2v2/Makefile.am | 29 - pcsx2v2/RDebug/Makefile.am | 7 - pcsx2v2/build.sh | 54 - pcsx2v2/install-sh | 323 --- pcsx2v2/mkinstalldirs | 158 -- pcsx2v2/tinyxml/Makefile.am | 5 - pcsx2v2/windows/afxresmw.h | 23 - pcsx2v2/windows/mingw/Makefile.win | 348 --- pcsx2v2/windows/mingw/afxres.h | 23 - pcsx2v2/windows/mingw/pcsx2.dev | 2116 --------------- pcsx2v2/windows/mingw/pcsx2.layout | 1424 ---------- pcsx2v2/windows/mingw/pcsx2_private.h | 40 - pcsx2v2/windows/mingw/pcsx2_private.rc | 5 - pcsx2v2/x86/Makefile.am | 22 - pcsx2v2/x86/ix86-64/aR3000A-64.asm | 190 -- pcsx2v2/x86/ix86-64/aR5900-64.S | 249 -- pcsx2v2/x86/ix86-64/aR5900-64.asm | 261 -- pcsx2v2/x86/ix86-64/aVUzerorec-64.asm | 126 - pcsx2v2/x86/ix86-64/aVif_proc-64.asm | 1827 ------------- pcsx2v2/x86/ix86-64/fast_routines-64.asm | 294 --- pcsx2v2/x86/ix86-64/iCore-64.cpp | 720 ----- pcsx2v2/x86/ix86-64/iR5900-64.cpp | 2754 -------------------- pcsx2v2/x86/ix86-64/iR5900Arit-64.cpp | 213 -- pcsx2v2/x86/ix86-64/iR5900AritImm-64.cpp | 169 -- pcsx2v2/x86/ix86-64/iR5900Branch-64.cpp | 537 ---- pcsx2v2/x86/ix86-64/iR5900Jump-64.cpp | 114 - pcsx2v2/x86/ix86-64/iR5900LoadStore-64.cpp | 423 --- pcsx2v2/x86/ix86-64/iR5900Move-64.cpp | 85 - pcsx2v2/x86/ix86-64/iR5900MultDiv-64.cpp | 164 -- pcsx2v2/x86/ix86-64/iR5900Shift-64.cpp | 264 -- pcsx2v2/x86/ix86/Makefile.am | 9 - pcsx2v2/zlib/Makefile.am | 6 - 35 files changed, 13001 deletions(-) delete mode 100644 pcsx2v2/DebugTools/Makefile.am delete mode 100644 pcsx2v2/IPU/Makefile.am delete mode 100644 pcsx2v2/IPU/mpeg2lib/Makefile.am delete mode 100644 pcsx2v2/Makefile.am delete mode 100644 pcsx2v2/RDebug/Makefile.am delete mode 100644 pcsx2v2/build.sh delete mode 100644 pcsx2v2/install-sh delete mode 100644 pcsx2v2/mkinstalldirs delete mode 100644 pcsx2v2/tinyxml/Makefile.am delete mode 100644 pcsx2v2/windows/afxresmw.h delete mode 100644 pcsx2v2/windows/mingw/Makefile.win delete mode 100644 pcsx2v2/windows/mingw/afxres.h delete mode 100644 pcsx2v2/windows/mingw/pcsx2.dev delete mode 100644 pcsx2v2/windows/mingw/pcsx2.layout delete mode 100644 pcsx2v2/windows/mingw/pcsx2_private.h delete mode 100644 pcsx2v2/windows/mingw/pcsx2_private.rc delete mode 100644 pcsx2v2/x86/Makefile.am delete mode 100644 pcsx2v2/x86/ix86-64/aR3000A-64.asm delete mode 100644 pcsx2v2/x86/ix86-64/aR5900-64.S delete mode 100644 pcsx2v2/x86/ix86-64/aR5900-64.asm delete mode 100644 pcsx2v2/x86/ix86-64/aVUzerorec-64.asm delete mode 100644 pcsx2v2/x86/ix86-64/aVif_proc-64.asm delete mode 100644 pcsx2v2/x86/ix86-64/fast_routines-64.asm delete mode 100644 pcsx2v2/x86/ix86-64/iCore-64.cpp delete mode 100644 pcsx2v2/x86/ix86-64/iR5900-64.cpp delete mode 100644 pcsx2v2/x86/ix86-64/iR5900Arit-64.cpp delete mode 100644 pcsx2v2/x86/ix86-64/iR5900AritImm-64.cpp delete mode 100644 pcsx2v2/x86/ix86-64/iR5900Branch-64.cpp delete mode 100644 pcsx2v2/x86/ix86-64/iR5900Jump-64.cpp delete mode 100644 pcsx2v2/x86/ix86-64/iR5900LoadStore-64.cpp delete mode 100644 pcsx2v2/x86/ix86-64/iR5900Move-64.cpp delete mode 100644 pcsx2v2/x86/ix86-64/iR5900MultDiv-64.cpp delete mode 100644 pcsx2v2/x86/ix86-64/iR5900Shift-64.cpp delete mode 100644 pcsx2v2/x86/ix86/Makefile.am delete mode 100644 pcsx2v2/zlib/Makefile.am diff --git a/pcsx2v2/DebugTools/Makefile.am b/pcsx2v2/DebugTools/Makefile.am deleted file mode 100644 index 8d6763c..0000000 --- a/pcsx2v2/DebugTools/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -INCLUDES = -I@srcdir@/../ -noinst_LIBRARIES = libDebugTools.a - -libDebugTools_a_SOURCES = \ -cpuopsDebug.c Debug.h.bak DisR3000asm.c DisVU0Micro.c DisVUops.h \ -cpuopsDebug.h DisASM.h DisR5900asm.c DisVU1Micro.c \ -Debug.h DisR3000A.c DisR5900.c DisVUmicro.h diff --git a/pcsx2v2/IPU/Makefile.am b/pcsx2v2/IPU/Makefile.am deleted file mode 100644 index e76e416..0000000 --- a/pcsx2v2/IPU/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -INCLUDES = -I@srcdir@/../ -I@srcdir@/../x86 -noinst_LIBRARIES = libIPU.a - -libIPU_a_SOURCES = IPU.c yuv2rgb.c coroutine.c acoroutine.S - -SUBDIRS = mpeg2lib - -#libIPU_a_LIBADD = mpeg2lib/libmpeg2IPU.a \ No newline at end of file diff --git a/pcsx2v2/IPU/mpeg2lib/Makefile.am b/pcsx2v2/IPU/mpeg2lib/Makefile.am deleted file mode 100644 index 93e7a87..0000000 --- a/pcsx2v2/IPU/mpeg2lib/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -INCLUDES = -I@srcdir@/../ -I@srcdir@/../../ -noinst_LIBRARIES = libmpeg2IPU.a - -libmpeg2IPU_a_SOURCES = Idct.c Mpeg.c Mpeg.h Vlc.h \ No newline at end of file diff --git a/pcsx2v2/Makefile.am b/pcsx2v2/Makefile.am deleted file mode 100644 index 24cd733..0000000 --- a/pcsx2v2/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -AUTOMAKE_OPTIONS = foreign -INCLUDES = -I@srcdir@/x86/ -noinst_LIBRARIES = libpcsx2.a - -libpcsx2_a_SOURCES = \ -CdRom.c Decode_XA.h Mdec.h PsxBios.h R3000A.c Vif.h \ -CdRom.h EEregs.h PsxCommon.h R3000A.h VU0.c \ -CDVD.c Elfheader.c Memory.c PsxCounters.c R5900.c VU0.h \ -CDVD.h Elfheader.h Memory.h PsxCounters.h R5900.h VU0micro.c \ -CDVDiso.c FiFo.c Misc.c PsxDma.c Sif.c VU1micro.c \ -CDVDisodrv.c FPU2.cpp PsxDma.h Sifcmd.h VUflags.c \ -CDVDisodrv.h FPU.c MMI.c Sif.h VUflags.h \ -CDVDiso.h GS.cpp Patch.c Sio.c VU.h \ -CDVDlib.h GS.h Patch.h PsxHw.c Sio.h VUmicro.h \ -Common.h Hw.c Plugins.c PsxHw.h SPR.c VUops.c \ -COP0.c Hw.h Plugins.h PsxInterpreter.c SPR.h VUops.h \ -COP0.h Interpreter.c PS2Edefs.h PsxMem.c System.h \ -Counters.c InterTables.c PS2Etypes.h PsxMem.h Vif.c \ -Counters.h InterTables.h PsxBios2.h PsxSio2.c VifDma.c \ -Decode_XA.c Mdec.c PsxBios.c PsxSio2.h VifDma.h Cache.c \ -xmlpatchloader.cpp - -if RECBUILD -recdir = x86 -else -recdir= -endif - -SUBDIRS = $(recdir) . DebugTools IPU RDebug tinyxml Linux \ No newline at end of file diff --git a/pcsx2v2/RDebug/Makefile.am b/pcsx2v2/RDebug/Makefile.am deleted file mode 100644 index 80aa6b0..0000000 --- a/pcsx2v2/RDebug/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -INCLUDES = -I@srcdir@/../ -noinst_LIBRARIES = libRDebug.a - -libRDebug_a_SOURCES = \ -deci2.c deci2_dcmp.c deci2_drfp.h deci2_iloadp.h deci2_ttyp.c \ -deci2_dbgp.c deci2_dcmp.h deci2.h deci2_netmp.c deci2_ttyp.h \ -deci2_dbgp.h deci2_iloadp.c deci2_netmp.h \ No newline at end of file diff --git a/pcsx2v2/build.sh b/pcsx2v2/build.sh deleted file mode 100644 index ff9a9cf..0000000 --- a/pcsx2v2/build.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# Pcsx2 - Pc Ps2 Emulator -# Copyright (C) 2002-2008 Pcsx2 Team -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -# - -echo --------------- -echo Building Pcsx2 -echo --------------- - -if [ $# -gt 0 ] && [ $1 = "all" ] -then - -aclocal -automake -autoconf -chmod +x configure -./configure ${PCSX2OPTIONS} -make clean -make install - -else - -make $@ - -#if [ $? -ne 0 ] -#then -#exit 1 -#fi - -#if [ $# -eq 0 ] || [ $1 != "clean" ] -#then -#make install -#fi - -fi - -if [ $? -ne 0 ] -then -exit 1 -fi diff --git a/pcsx2v2/install-sh b/pcsx2v2/install-sh deleted file mode 100644 index 4d4a951..0000000 --- a/pcsx2v2/install-sh +++ /dev/null @@ -1,323 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2005-05-14.22 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -chmodcmd="$chmodprog 0755" -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= -dstarg= -no_target_directory= - -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test -n "$1"; do - case $1 in - -c) shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit $?;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; - - --version) echo "$0 $scriptversion"; exit $?;; - - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done - break;; - esac -done - -if test -z "$1"; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src ;; - esac - - if test -n "$dir_arg"; then - dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi - else - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dstarg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dstarg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst ;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 - exit 1 - fi - dst=$dst/`basename "$src"` - fi - fi - - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` - - # Make sure that the destination directory exists. - - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" - - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS - - pathcomp= - - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 - shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit - fi - pathcomp=$pathcomp/ - done - fi - - if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - - else - dstfile=`basename "$dst"` - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 - - # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - } - } - fi || { (exit 1); exit 1; } -done - -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit 0 -} - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/pcsx2v2/mkinstalldirs b/pcsx2v2/mkinstalldirs deleted file mode 100644 index 259dbfc..0000000 --- a/pcsx2v2/mkinstalldirs +++ /dev/null @@ -1,158 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy - -scriptversion=2005-06-29.22 - -# Original author: Noah Friedman -# Created: 1993-05-16 -# Public domain. -# -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -errstatus=0 -dirmode= - -usage="\ -Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... - -Create each directory DIR (with mode MODE, if specified), including all -leading file name components. - -Report bugs to ." - -# process command line arguments -while test $# -gt 0 ; do - case $1 in - -h | --help | --h*) # -h for help - echo "$usage" - exit $? - ;; - -m) # -m PERM arg - shift - test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } - dirmode=$1 - shift - ;; - --version) - echo "$0 $scriptversion" - exit $? - ;; - --) # stop option processing - shift - break - ;; - -*) # unknown option - echo "$usage" 1>&2 - exit 1 - ;; - *) # first non-opt arg - break - ;; - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done - -case $# in - 0) exit 0 ;; -esac - -# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and -# mkdir -p a/c at the same time, both will detect that a is missing, -# one will create a, then the other will try to create a and die with -# a "File exists" error. This is a problem when calling mkinstalldirs -# from a parallel make. We use --version in the probe to restrict -# ourselves to GNU mkdir, which is thread-safe. -case $dirmode in - '') - if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - echo "mkdir -p -- $*" - exec mkdir -p -- "$@" - else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - test -d ./-p && rmdir ./-p - test -d ./--version && rmdir ./--version - fi - ;; - *) - if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && - test ! -d ./--version; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - else - # Clean up after NextStep and OpenStep mkdir. - for d in ./-m ./-p ./--version "./$dirmode"; - do - test -d $d && rmdir $d - done - fi - ;; -esac - -for file -do - case $file in - /*) pathcomp=/ ;; - *) pathcomp= ;; - esac - oIFS=$IFS - IFS=/ - set fnord $file - shift - IFS=$oIFS - - for d - do - test "x$d" = x && continue - - pathcomp=$pathcomp$d - case $pathcomp in - -*) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - lasterr= - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp=$pathcomp/ - done -done - -exit $errstatus - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/pcsx2v2/tinyxml/Makefile.am b/pcsx2v2/tinyxml/Makefile.am deleted file mode 100644 index 5d65694..0000000 --- a/pcsx2v2/tinyxml/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -INCLUDES = -I../ -noinst_LIBRARIES = libtinyxml.a - -libtinyxml_a_SOURCES = \ -tinystr.h tinyxml.h tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp \ No newline at end of file diff --git a/pcsx2v2/windows/afxresmw.h b/pcsx2v2/windows/afxresmw.h deleted file mode 100644 index 147f64b..0000000 --- a/pcsx2v2/windows/afxresmw.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * Original code (2.0 and earlier )copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include - -#define IDC_STATIC (-1) diff --git a/pcsx2v2/windows/mingw/Makefile.win b/pcsx2v2/windows/mingw/Makefile.win deleted file mode 100644 index 7449952..0000000 --- a/pcsx2v2/windows/mingw/Makefile.win +++ /dev/null @@ -1,348 +0,0 @@ -# Project: pcsx2 -# Makefile created by Dev-C++ 4.9.9.2 - -CPP = mingw32-g++.exe -CC = mingw32-gcc.exe -WINDRES = windres.exe -RES = Obj//pcsx2_private.res -OBJ = Obj//AboutDlg.o Obj//ConfigDlg.o Obj//CpuDlg.o Obj//Debugger.o Obj//DebugMemory.o Obj//Debugreg.o Obj//ini.o Obj//McdsDlg.o Obj//PatchBrowser.o Obj//RDebugger.o Obj//WinMain.o Obj//Idct.o Obj//IPU.o Obj//Mpeg.o Obj//yuv2rgb.o Obj//cpuopsDebug.o Obj//DisR3000A.o Obj//DisR3000asm.o Obj//DisR5900.o Obj//DisR5900asm.o Obj//DisVU0Micro.o Obj//DisVU1Micro.o Obj//adler32.o Obj//compress.o Obj//crc32.o Obj//deflate.o Obj//gzio.o Obj//infback.o Obj//inffast.o Obj//inflate.o Obj//inftrees.o Obj//trees.o Obj//uncompr.o Obj//zutil.o Obj//iR5900Arit.o Obj//iR5900AritImm.o Obj//iR5900Branch.o Obj//iR5900Jump.o Obj//iR5900LoadStore.o Obj//iR5900Move.o Obj//iR5900MultDiv.o Obj//iR5900Shift.o Obj//iCP0.o Obj//iFPU.o Obj//iMMI.o Obj//iR3000A.o Obj//iR5900.o Obj//iVU0micro.o Obj//iVU1micro.o Obj//iVUmicro.o Obj//recCOP2.o Obj//ix86.o Obj//ix86_3dnow.o Obj//ix86_cpudetect.o Obj//ix86_fpu.o Obj//ix86_mmx.o Obj//ix86_sse.o Obj//CDVD.o Obj//CDVDiso.o Obj//CDVDisodrv.o Obj//COP0.o Obj//Counters.o Obj//Decode_XA.o Obj//Elfheader.o Obj//FiFo.o Obj//FPU.o Obj//GS.o Obj//Gte.o Obj//Hw.o Obj//Interpreter.o Obj//InterTables.o Obj//Mdec.o Obj//Memory.o Obj//Misc.o Obj//MMI.o Obj//Patch.o Obj//Plugins.o Obj//PsxBios.o Obj//PsxCounters.o Obj//PsxDma.o Obj//PsxGPU.o Obj//PsxHw.o Obj//PsxInterpreter.o Obj//PsxMem.o Obj//PsxSio2.o Obj//R3000A.o Obj//R5900.o Obj//Sif.o Obj//Sio.o Obj//SPR.o Obj//Stats.o Obj//Vif.o Obj//VifDma.o Obj//VU0.o Obj//VU0micro.o Obj//VU1micro.o Obj//VUflags.o Obj//VUops.o Obj//Cache.o Obj//CdRom.o Obj//deci2.o Obj//deci2_dbgp.o Obj//deci2_dcmp.o Obj//deci2_iloadp.o Obj//deci2_netmp.o Obj//deci2_ttyp.o $(RES) -LINKOBJ = Obj//AboutDlg.o Obj//ConfigDlg.o Obj//CpuDlg.o Obj//Debugger.o Obj//DebugMemory.o Obj//Debugreg.o Obj//ini.o Obj//McdsDlg.o Obj//PatchBrowser.o Obj//RDebugger.o Obj//WinMain.o Obj//Idct.o Obj//IPU.o Obj//Mpeg.o Obj//yuv2rgb.o Obj//cpuopsDebug.o Obj//DisR3000A.o Obj//DisR3000asm.o Obj//DisR5900.o Obj//DisR5900asm.o Obj//DisVU0Micro.o Obj//DisVU1Micro.o Obj//adler32.o Obj//compress.o Obj//crc32.o Obj//deflate.o Obj//gzio.o Obj//infback.o Obj//inffast.o Obj//inflate.o Obj//inftrees.o Obj//trees.o Obj//uncompr.o Obj//zutil.o Obj//iR5900Arit.o Obj//iR5900AritImm.o Obj//iR5900Branch.o Obj//iR5900Jump.o Obj//iR5900LoadStore.o Obj//iR5900Move.o Obj//iR5900MultDiv.o Obj//iR5900Shift.o Obj//iCP0.o Obj//iFPU.o Obj//iMMI.o Obj//iR3000A.o Obj//iR5900.o Obj//iVU0micro.o Obj//iVU1micro.o Obj//iVUmicro.o Obj//recCOP2.o Obj//ix86.o Obj//ix86_3dnow.o Obj//ix86_cpudetect.o Obj//ix86_fpu.o Obj//ix86_mmx.o Obj//ix86_sse.o Obj//CDVD.o Obj//CDVDiso.o Obj//CDVDisodrv.o Obj//COP0.o Obj//Counters.o Obj//Decode_XA.o Obj//Elfheader.o Obj//FiFo.o Obj//FPU.o Obj//GS.o Obj//Gte.o Obj//Hw.o Obj//Interpreter.o Obj//InterTables.o Obj//Mdec.o Obj//Memory.o Obj//Misc.o Obj//MMI.o Obj//Patch.o Obj//Plugins.o Obj//PsxBios.o Obj//PsxCounters.o Obj//PsxDma.o Obj//PsxGPU.o Obj//PsxHw.o Obj//PsxInterpreter.o Obj//PsxMem.o Obj//PsxSio2.o Obj//R3000A.o Obj//R5900.o Obj//Sif.o Obj//Sio.o Obj//SPR.o Obj//Stats.o Obj//Vif.o Obj//VifDma.o Obj//VU0.o Obj//VU0micro.o Obj//VU1micro.o Obj//VUflags.o Obj//VUops.o Obj//Cache.o Obj//CdRom.o Obj//deci2.o Obj//deci2_dbgp.o Obj//deci2_dcmp.o Obj//deci2_iloadp.o Obj//deci2_netmp.o Obj//deci2_ttyp.o $(RES) -LIBS = -mwindows -Wall -lcomctl32 -lwsock32 -lwinmm -lgdi32 -lcomdlg32 -s -INCS = -I"../../" -I"C:/Documents and Settings/shadow/Desktop/Npcsx2" -I"../../" -I"../../zlib" -I"../../DebugTools" -I"../../IPU" -I"../../x86" -I"../../ix86-32" -I"../" -CXXINCS = -I"../../" -I"../../zlib" -I"../../DebugTools" -I"../../IPU" -I"../../x86" -I"../../ix86-32" -I"../" -BIN = pcsx2.exe -CXXFLAGS = $(CXXINCS) -CFLAGS = $(INCS) -D__WIN32__ -D__MINGW32__ -O3 -fomit-frame-pointer -finline-functions -fno-exceptions -ffast-math -fno-strict-aliasing -m128bit-long-double -mfpmath=sse -march=athlon64 -RM = rm -f - -.PHONY: all all-before all-after clean clean-custom - -all: all-before pcsx2.exe all-after - - -clean: clean-custom - ${RM} $(OBJ) $(BIN) - -$(BIN): $(OBJ) - $(CC) $(LINKOBJ) -o "pcsx2.exe" $(LIBS) - -Obj//AboutDlg.o: ../AboutDlg.c - $(CC) -c ../AboutDlg.c -o Obj//AboutDlg.o $(CFLAGS) - -Obj//ConfigDlg.o: ../ConfigDlg.c - $(CC) -c ../ConfigDlg.c -o Obj//ConfigDlg.o $(CFLAGS) - -Obj//CpuDlg.o: ../CpuDlg.c - $(CC) -c ../CpuDlg.c -o Obj//CpuDlg.o $(CFLAGS) - -Obj//Debugger.o: ../Debugger.c - $(CC) -c ../Debugger.c -o Obj//Debugger.o $(CFLAGS) - -Obj//DebugMemory.o: ../DebugMemory.c - $(CC) -c ../DebugMemory.c -o Obj//DebugMemory.o $(CFLAGS) - -Obj//Debugreg.o: ../Debugreg.c - $(CC) -c ../Debugreg.c -o Obj//Debugreg.o $(CFLAGS) - -Obj//ini.o: ../ini.c - $(CC) -c ../ini.c -o Obj//ini.o $(CFLAGS) - -Obj//McdsDlg.o: ../McdsDlg.c - $(CC) -c ../McdsDlg.c -o Obj//McdsDlg.o $(CFLAGS) - -Obj//PatchBrowser.o: ../PatchBrowser.c - $(CC) -c ../PatchBrowser.c -o Obj//PatchBrowser.o $(CFLAGS) - -Obj//RDebugger.o: ../RDebugger.c - $(CC) -c ../RDebugger.c -o Obj//RDebugger.o $(CFLAGS) - -Obj//WinMain.o: ../WinMain.c - $(CC) -c ../WinMain.c -o Obj//WinMain.o $(CFLAGS) - -Obj//Idct.o: ../../IPU/Idct.c - $(CC) -c ../../IPU/Idct.c -o Obj//Idct.o $(CFLAGS) - -Obj//IPU.o: ../../IPU/IPU.c - $(CC) -c ../../IPU/IPU.c -o Obj//IPU.o $(CFLAGS) - -Obj//Mpeg.o: ../../IPU/Mpeg.c - $(CC) -c ../../IPU/Mpeg.c -o Obj//Mpeg.o $(CFLAGS) - -Obj//yuv2rgb.o: ../../IPU/yuv2rgb.c - $(CC) -c ../../IPU/yuv2rgb.c -o Obj//yuv2rgb.o $(CFLAGS) - -Obj//cpuopsDebug.o: ../../DebugTools/cpuopsDebug.c - $(CC) -c ../../DebugTools/cpuopsDebug.c -o Obj//cpuopsDebug.o $(CFLAGS) - -Obj//DisR3000A.o: ../../DebugTools/DisR3000A.c - $(CC) -c ../../DebugTools/DisR3000A.c -o Obj//DisR3000A.o $(CFLAGS) - -Obj//DisR3000asm.o: ../../DebugTools/DisR3000asm.c - $(CC) -c ../../DebugTools/DisR3000asm.c -o Obj//DisR3000asm.o $(CFLAGS) - -Obj//DisR5900.o: ../../DebugTools/DisR5900.c - $(CC) -c ../../DebugTools/DisR5900.c -o Obj//DisR5900.o $(CFLAGS) - -Obj//DisR5900asm.o: ../../DebugTools/DisR5900asm.c - $(CC) -c ../../DebugTools/DisR5900asm.c -o Obj//DisR5900asm.o $(CFLAGS) - -Obj//DisVU0Micro.o: ../../DebugTools/DisVU0Micro.c - $(CC) -c ../../DebugTools/DisVU0Micro.c -o Obj//DisVU0Micro.o $(CFLAGS) - -Obj//DisVU1Micro.o: ../../DebugTools/DisVU1Micro.c - $(CC) -c ../../DebugTools/DisVU1Micro.c -o Obj//DisVU1Micro.o $(CFLAGS) - -Obj//adler32.o: ../../zlib/adler32.c - $(CC) -c ../../zlib/adler32.c -o Obj//adler32.o $(CFLAGS) - -Obj//compress.o: ../../zlib/compress.c - $(CC) -c ../../zlib/compress.c -o Obj//compress.o $(CFLAGS) - -Obj//crc32.o: ../../zlib/crc32.c - $(CC) -c ../../zlib/crc32.c -o Obj//crc32.o $(CFLAGS) - -Obj//deflate.o: ../../zlib/deflate.c - $(CC) -c ../../zlib/deflate.c -o Obj//deflate.o $(CFLAGS) - -Obj//gzio.o: ../../zlib/gzio.c - $(CC) -c ../../zlib/gzio.c -o Obj//gzio.o $(CFLAGS) - -Obj//infback.o: ../../zlib/infback.c - $(CC) -c ../../zlib/infback.c -o Obj//infback.o $(CFLAGS) - -Obj//inffast.o: ../../zlib/inffast.c - $(CC) -c ../../zlib/inffast.c -o Obj//inffast.o $(CFLAGS) - -Obj//inflate.o: ../../zlib/inflate.c - $(CC) -c ../../zlib/inflate.c -o Obj//inflate.o $(CFLAGS) - -Obj//inftrees.o: ../../zlib/inftrees.c - $(CC) -c ../../zlib/inftrees.c -o Obj//inftrees.o $(CFLAGS) - -Obj//trees.o: ../../zlib/trees.c - $(CC) -c ../../zlib/trees.c -o Obj//trees.o $(CFLAGS) - -Obj//uncompr.o: ../../zlib/uncompr.c - $(CC) -c ../../zlib/uncompr.c -o Obj//uncompr.o $(CFLAGS) - -Obj//zutil.o: ../../zlib/zutil.c - $(CC) -c ../../zlib/zutil.c -o Obj//zutil.o $(CFLAGS) - -Obj//iR5900Arit.o: ../../ix86-32/iR5900Arit.c - $(CC) -c ../../ix86-32/iR5900Arit.c -o Obj//iR5900Arit.o $(CFLAGS) - -Obj//iR5900AritImm.o: ../../ix86-32/iR5900AritImm.c - $(CC) -c ../../ix86-32/iR5900AritImm.c -o Obj//iR5900AritImm.o $(CFLAGS) - -Obj//iR5900Branch.o: ../../ix86-32/iR5900Branch.c - $(CC) -c ../../ix86-32/iR5900Branch.c -o Obj//iR5900Branch.o $(CFLAGS) - -Obj//iR5900Jump.o: ../../ix86-32/iR5900Jump.c - $(CC) -c ../../ix86-32/iR5900Jump.c -o Obj//iR5900Jump.o $(CFLAGS) - -Obj//iR5900LoadStore.o: ../../ix86-32/iR5900LoadStore.c - $(CC) -c ../../ix86-32/iR5900LoadStore.c -o Obj//iR5900LoadStore.o $(CFLAGS) - -Obj//iR5900Move.o: ../../ix86-32/iR5900Move.c - $(CC) -c ../../ix86-32/iR5900Move.c -o Obj//iR5900Move.o $(CFLAGS) - -Obj//iR5900MultDiv.o: ../../ix86-32/iR5900MultDiv.c - $(CC) -c ../../ix86-32/iR5900MultDiv.c -o Obj//iR5900MultDiv.o $(CFLAGS) - -Obj//iR5900Shift.o: ../../ix86-32/iR5900Shift.c - $(CC) -c ../../ix86-32/iR5900Shift.c -o Obj//iR5900Shift.o $(CFLAGS) - -Obj//iCP0.o: ../../x86/iCP0.c - $(CC) -c ../../x86/iCP0.c -o Obj//iCP0.o $(CFLAGS) - -Obj//iFPU.o: ../../x86/iFPU.c - $(CC) -c ../../x86/iFPU.c -o Obj//iFPU.o $(CFLAGS) - -Obj//iMMI.o: ../../x86/iMMI.c - $(CC) -c ../../x86/iMMI.c -o Obj//iMMI.o $(CFLAGS) - -Obj//iR3000A.o: ../../x86/iR3000A.c - $(CC) -c ../../x86/iR3000A.c -o Obj//iR3000A.o $(CFLAGS) - -Obj//iR5900.o: ../../x86/iR5900.c - $(CC) -c ../../x86/iR5900.c -o Obj//iR5900.o $(CFLAGS) - -Obj//iVU0micro.o: ../../x86/iVU0micro.c - $(CC) -c ../../x86/iVU0micro.c -o Obj//iVU0micro.o $(CFLAGS) - -Obj//iVU1micro.o: ../../x86/iVU1micro.c - $(CC) -c ../../x86/iVU1micro.c -o Obj//iVU1micro.o $(CFLAGS) - -Obj//iVUmicro.o: ../../x86/iVUmicro.c - $(CC) -c ../../x86/iVUmicro.c -o Obj//iVUmicro.o $(CFLAGS) - -Obj//recCOP2.o: ../../x86/recCOP2.c - $(CC) -c ../../x86/recCOP2.c -o Obj//recCOP2.o $(CFLAGS) - -Obj//ix86.o: ../../x86/ix86/ix86.c - $(CC) -c ../../x86/ix86/ix86.c -o Obj//ix86.o $(CFLAGS) - -Obj//ix86_3dnow.o: ../../x86/ix86/ix86_3dnow.c - $(CC) -c ../../x86/ix86/ix86_3dnow.c -o Obj//ix86_3dnow.o $(CFLAGS) - -Obj//ix86_cpudetect.o: ../../x86/ix86/ix86_cpudetect.c - $(CC) -c ../../x86/ix86/ix86_cpudetect.c -o Obj//ix86_cpudetect.o $(CFLAGS) - -Obj//ix86_fpu.o: ../../x86/ix86/ix86_fpu.c - $(CC) -c ../../x86/ix86/ix86_fpu.c -o Obj//ix86_fpu.o $(CFLAGS) - -Obj//ix86_mmx.o: ../../x86/ix86/ix86_mmx.c - $(CC) -c ../../x86/ix86/ix86_mmx.c -o Obj//ix86_mmx.o $(CFLAGS) - -Obj//ix86_sse.o: ../../x86/ix86/ix86_sse.c - $(CC) -c ../../x86/ix86/ix86_sse.c -o Obj//ix86_sse.o $(CFLAGS) - -Obj//CDVD.o: ../../CDVD.c - $(CC) -c ../../CDVD.c -o Obj//CDVD.o $(CFLAGS) - -Obj//CDVDiso.o: ../../CDVDiso.c - $(CC) -c ../../CDVDiso.c -o Obj//CDVDiso.o $(CFLAGS) - -Obj//CDVDisodrv.o: ../../CDVDisodrv.c - $(CC) -c ../../CDVDisodrv.c -o Obj//CDVDisodrv.o $(CFLAGS) - -Obj//COP0.o: ../../COP0.c - $(CC) -c ../../COP0.c -o Obj//COP0.o $(CFLAGS) - -Obj//Counters.o: ../../Counters.c - $(CC) -c ../../Counters.c -o Obj//Counters.o $(CFLAGS) - -Obj//Decode_XA.o: ../../Decode_XA.c - $(CC) -c ../../Decode_XA.c -o Obj//Decode_XA.o $(CFLAGS) - -Obj//Elfheader.o: ../../Elfheader.c - $(CC) -c ../../Elfheader.c -o Obj//Elfheader.o $(CFLAGS) - -Obj//FiFo.o: ../../FiFo.c - $(CC) -c ../../FiFo.c -o Obj//FiFo.o $(CFLAGS) - -Obj//FPU.o: ../../FPU.c - $(CC) -c ../../FPU.c -o Obj//FPU.o $(CFLAGS) - -Obj//GS.o: ../../GS.c - $(CC) -c ../../GS.c -o Obj//GS.o $(CFLAGS) - -Obj//Gte.o: ../../Gte.c - $(CC) -c ../../Gte.c -o Obj//Gte.o $(CFLAGS) - -Obj//Hw.o: ../../Hw.c - $(CC) -c ../../Hw.c -o Obj//Hw.o $(CFLAGS) - -Obj//Interpreter.o: ../../Interpreter.c - $(CC) -c ../../Interpreter.c -o Obj//Interpreter.o $(CFLAGS) - -Obj//InterTables.o: ../../InterTables.c - $(CC) -c ../../InterTables.c -o Obj//InterTables.o $(CFLAGS) - -Obj//Mdec.o: ../../Mdec.c - $(CC) -c ../../Mdec.c -o Obj//Mdec.o $(CFLAGS) - -Obj//Memory.o: ../../Memory.c - $(CC) -c ../../Memory.c -o Obj//Memory.o $(CFLAGS) - -Obj//Misc.o: ../../Misc.c - $(CC) -c ../../Misc.c -o Obj//Misc.o $(CFLAGS) - -Obj//MMI.o: ../../MMI.c - $(CC) -c ../../MMI.c -o Obj//MMI.o $(CFLAGS) - -Obj//Patch.o: ../../Patch.c - $(CC) -c ../../Patch.c -o Obj//Patch.o $(CFLAGS) - -Obj//Plugins.o: ../../Plugins.c - $(CC) -c ../../Plugins.c -o Obj//Plugins.o $(CFLAGS) - -Obj//PsxBios.o: ../../PsxBios.c - $(CC) -c ../../PsxBios.c -o Obj//PsxBios.o $(CFLAGS) - -Obj//PsxCounters.o: ../../PsxCounters.c - $(CC) -c ../../PsxCounters.c -o Obj//PsxCounters.o $(CFLAGS) - -Obj//PsxDma.o: ../../PsxDma.c - $(CC) -c ../../PsxDma.c -o Obj//PsxDma.o $(CFLAGS) - -Obj//PsxGPU.o: ../../PsxGPU.c - $(CC) -c ../../PsxGPU.c -o Obj//PsxGPU.o $(CFLAGS) - -Obj//PsxHw.o: ../../PsxHw.c - $(CC) -c ../../PsxHw.c -o Obj//PsxHw.o $(CFLAGS) - -Obj//PsxInterpreter.o: ../../PsxInterpreter.c - $(CC) -c ../../PsxInterpreter.c -o Obj//PsxInterpreter.o $(CFLAGS) - -Obj//PsxMem.o: ../../PsxMem.c - $(CC) -c ../../PsxMem.c -o Obj//PsxMem.o $(CFLAGS) - -Obj//PsxSio2.o: ../../PsxSio2.c - $(CC) -c ../../PsxSio2.c -o Obj//PsxSio2.o $(CFLAGS) - -Obj//R3000A.o: ../../R3000A.c - $(CC) -c ../../R3000A.c -o Obj//R3000A.o $(CFLAGS) - -Obj//R5900.o: ../../R5900.c - $(CC) -c ../../R5900.c -o Obj//R5900.o $(CFLAGS) - -Obj//Sif.o: ../../Sif.c - $(CC) -c ../../Sif.c -o Obj//Sif.o $(CFLAGS) - -Obj//Sio.o: ../../Sio.c - $(CC) -c ../../Sio.c -o Obj//Sio.o $(CFLAGS) - -Obj//SPR.o: ../../SPR.c - $(CC) -c ../../SPR.c -o Obj//SPR.o $(CFLAGS) - -Obj//Stats.o: ../../Stats.c - $(CC) -c ../../Stats.c -o Obj//Stats.o $(CFLAGS) - -Obj//Vif.o: ../../Vif.c - $(CC) -c ../../Vif.c -o Obj//Vif.o $(CFLAGS) - -Obj//VifDma.o: ../../VifDma.c - $(CC) -c ../../VifDma.c -o Obj//VifDma.o $(CFLAGS) - -Obj//VU0.o: ../../VU0.c - $(CC) -c ../../VU0.c -o Obj//VU0.o $(CFLAGS) - -Obj//VU0micro.o: ../../VU0micro.c - $(CC) -c ../../VU0micro.c -o Obj//VU0micro.o $(CFLAGS) - -Obj//VU1micro.o: ../../VU1micro.c - $(CC) -c ../../VU1micro.c -o Obj//VU1micro.o $(CFLAGS) - -Obj//VUflags.o: ../../VUflags.c - $(CC) -c ../../VUflags.c -o Obj//VUflags.o $(CFLAGS) - -Obj//VUops.o: ../../VUops.c - $(CC) -c ../../VUops.c -o Obj//VUops.o $(CFLAGS) - -Obj//Cache.o: ../../Cache.c - $(CC) -c ../../Cache.c -o Obj//Cache.o $(CFLAGS) - -Obj//CdRom.o: ../../CdRom.c - $(CC) -c ../../CdRom.c -o Obj//CdRom.o $(CFLAGS) - -Obj//deci2.o: ../../RDebug/deci2.c - $(CC) -c ../../RDebug/deci2.c -o Obj//deci2.o $(CFLAGS) - -Obj//deci2_dbgp.o: ../../RDebug/deci2_dbgp.c - $(CC) -c ../../RDebug/deci2_dbgp.c -o Obj//deci2_dbgp.o $(CFLAGS) - -Obj//deci2_dcmp.o: ../../RDebug/deci2_dcmp.c - $(CC) -c ../../RDebug/deci2_dcmp.c -o Obj//deci2_dcmp.o $(CFLAGS) - -Obj//deci2_iloadp.o: ../../RDebug/deci2_iloadp.c - $(CC) -c ../../RDebug/deci2_iloadp.c -o Obj//deci2_iloadp.o $(CFLAGS) - -Obj//deci2_netmp.o: ../../RDebug/deci2_netmp.c - $(CC) -c ../../RDebug/deci2_netmp.c -o Obj//deci2_netmp.o $(CFLAGS) - -Obj//deci2_ttyp.o: ../../RDebug/deci2_ttyp.c - $(CC) -c ../../RDebug/deci2_ttyp.c -o Obj//deci2_ttyp.o $(CFLAGS) - -Obj//pcsx2_private.res: pcsx2_private.rc ../pcsx2.rc - $(WINDRES) -i pcsx2_private.rc --input-format=rc -o Obj//pcsx2_private.res -O coff --include-dir ../../ --include-dir ../ --include-dir ../mingw diff --git a/pcsx2v2/windows/mingw/afxres.h b/pcsx2v2/windows/mingw/afxres.h deleted file mode 100644 index 147f64b..0000000 --- a/pcsx2v2/windows/mingw/afxres.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * Original code (2.0 and earlier )copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include - -#define IDC_STATIC (-1) diff --git a/pcsx2v2/windows/mingw/pcsx2.dev b/pcsx2v2/windows/mingw/pcsx2.dev deleted file mode 100644 index db8fafb..0000000 --- a/pcsx2v2/windows/mingw/pcsx2.dev +++ /dev/null @@ -1,2116 +0,0 @@ -[Project] -FileName=pcsx2.dev -Name=pcsx2 -UnitCount=205 -Type=0 -Ver=1 -ObjFiles= -Includes=../..;../../zlib;../../DebugTools;../../IPU;../../x86;../../ix86-32;..;../RDebug -Libs= -PrivateResource=pcsx2_private.rc -ResourceIncludes=../../;../;..\mingw -MakeIncludes= -Compiler=-v_@@_-D__WIN32___@@_-D__MINGW32__ _@@_-Wall _@@_-O3 ${-fomit-frame-pointer -finline-functions -fno-exceptions -ffast-math -fno-strict-aliasing} -mfpmath=sse -march=athlon64_@@_ _@@_ -CppCompiler= -Linker=-lcomctl32 _@@_-lwsock32 _@@_-lwinmm _@@_-lgdi32 _@@_-lcomdlg32 _@@__@@_-m128bit-long-double_@@_ -IsCpp=0 -Icon= -ExeOutput=../ -ObjectOutput=Obj/ -OverrideOutput=0 -OverrideOutputName=pcsx2.exe -HostApplication= -Folders=cpu,DebugTools,DECI2,GUI,Hardware,IOP_CPU,IPU,ix86,ix86/x86,ix86-32,misc,plugins,Sif,zlib -CommandLine= -UseCustomMakefile=0 -CustomMakefile=..\Makefile -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=0 -CompilerSettings=0000000000000000000000 - -[Unit1] -FileName=..\AboutDlg.c -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit2] -FileName=..\AboutDlg.h -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit3] -FileName=..\ConfigDlg.c -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit4] -FileName=..\CpuDlg.c -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit5] -FileName=..\Debugger.c -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit6] -FileName=..\Debugger.h -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit7] -FileName=..\DebugMemory.c -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit8] -FileName=..\Debugreg.c -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit9] -FileName=..\ini.c -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit10] -FileName=..\McdsDlg.c -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit11] -FileName=..\McdsDlg.h -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit12] -FileName=..\PatchBrowser.c -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit13] -FileName=..\pcsx2.rc -Folder=GUI -Compile=1 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit14] -FileName=..\RDebugger.c -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit15] -FileName=..\RDebugger.h -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit16] -FileName=..\resource.h -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit17] -FileName=..\Win32.h -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit18] -FileName=..\WinMain.c -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit19] -FileName=afxres.h -CompileCpp=0 -Folder=GUI -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit20] -FileName=..\..\IPU\Idct.c -CompileCpp=0 -Folder=IPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit21] -FileName=..\..\IPU\IPU.c -CompileCpp=0 -Folder=IPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit22] -FileName=..\..\IPU\IPU.h -CompileCpp=0 -Folder=IPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit23] -FileName=..\..\IPU\Mpeg.c -CompileCpp=0 -Folder=IPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit24] -FileName=..\..\IPU\Mpeg.h -CompileCpp=0 -Folder=IPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit25] -FileName=..\..\IPU\Vlc.h -CompileCpp=0 -Folder=IPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit26] -FileName=..\..\IPU\yuv2rgb.c -CompileCpp=0 -Folder=IPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit27] -FileName=..\..\IPU\yuv2rgb.h -CompileCpp=0 -Folder=IPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit28] -FileName=..\..\DebugTools\cpuopsDebug.c -CompileCpp=0 -Folder=DebugTools -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit29] -FileName=..\..\DebugTools\cpuopsDebug.h -CompileCpp=0 -Folder=DebugTools -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit30] -FileName=..\..\DebugTools\Debug.h -CompileCpp=0 -Folder=DebugTools -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit31] -FileName=..\..\DebugTools\DisASM.h -CompileCpp=0 -Folder=DebugTools -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit32] -FileName=..\..\DebugTools\DisR3000A.c -CompileCpp=0 -Folder=DebugTools -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit33] -FileName=..\..\DebugTools\DisR3000asm.c -CompileCpp=0 -Folder=DebugTools -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit34] -FileName=..\..\DebugTools\DisR5900.c -CompileCpp=0 -Folder=DebugTools -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit35] -FileName=..\..\DebugTools\DisR5900asm.c -CompileCpp=0 -Folder=DebugTools -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit36] -FileName=..\..\DebugTools\DisVU0Micro.c -CompileCpp=0 -Folder=DebugTools -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit37] -FileName=..\..\DebugTools\DisVU1Micro.c -CompileCpp=0 -Folder=DebugTools -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit38] -FileName=..\..\DebugTools\DisVUmicro.h -CompileCpp=0 -Folder=DebugTools -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit39] -FileName=..\..\DebugTools\DisVUops.h -CompileCpp=0 -Folder=DebugTools -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit40] -FileName=..\..\zlib\adler32.c -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit41] -FileName=..\..\zlib\compress.c -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit42] -FileName=..\..\zlib\crc32.c -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit43] -FileName=..\..\zlib\crc32.h -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit44] -FileName=..\..\zlib\deflate.c -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit45] -FileName=..\..\zlib\deflate.h -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit46] -FileName=..\..\zlib\gzio.c -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit47] -FileName=..\..\zlib\infback.c -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit48] -FileName=..\..\zlib\inffast.c -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit49] -FileName=..\..\zlib\inffast.h -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit50] -FileName=..\..\zlib\inffixed.h -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit51] -FileName=..\..\zlib\inflate.c -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit52] -FileName=..\..\zlib\inflate.h -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit53] -FileName=..\..\zlib\inftrees.c -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit54] -FileName=..\..\zlib\inftrees.h -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit55] -FileName=..\..\zlib\trees.c -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit56] -FileName=..\..\zlib\trees.h -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit57] -FileName=..\..\zlib\uncompr.c -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit58] -FileName=..\..\zlib\zconf.h -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit59] -FileName=..\..\zlib\zlib.h -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit60] -FileName=..\..\zlib\zutil.c -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit61] -FileName=..\..\zlib\zutil.h -CompileCpp=0 -Folder=zlib -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit62] -FileName=..\..\ix86-32\iR5900Arit.c -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit63] -FileName=..\..\ix86-32\iR5900Arit.h -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit64] -FileName=..\..\ix86-32\iR5900AritImm.c -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit65] -FileName=..\..\ix86-32\iR5900AritImm.h -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit66] -FileName=..\..\ix86-32\iR5900Branch.c -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit67] -FileName=..\..\ix86-32\iR5900Branch.h -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit68] -FileName=..\..\ix86-32\iR5900Jump.c -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit69] -FileName=..\..\ix86-32\iR5900Jump.h -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit70] -FileName=..\..\ix86-32\iR5900LoadStore.c -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit71] -FileName=..\..\ix86-32\iR5900LoadStore.h -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit72] -FileName=..\..\ix86-32\iR5900Move.c -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit73] -FileName=..\..\ix86-32\iR5900Move.h -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit74] -FileName=..\..\ix86-32\iR5900MultDiv.c -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit75] -FileName=..\..\ix86-32\iR5900MultDiv.h -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit76] -FileName=..\..\ix86-32\iR5900Shift.c -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit77] -FileName=..\..\ix86-32\iR5900Shift.h -CompileCpp=0 -Folder=ix86-32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit78] -FileName=..\..\x86\iCP0.c -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit79] -FileName=..\..\x86\iCP0.h -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit80] -FileName=..\..\x86\iFPU.c -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit81] -FileName=..\..\x86\iFPU.h -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit82] -FileName=..\..\x86\iMMI.c -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit83] -FileName=..\..\x86\iMMI.h -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit84] -FileName=..\..\x86\iR3000A.c -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit85] -FileName=..\..\x86\iR5900.c -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit86] -FileName=..\..\x86\iR5900.h -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit87] -FileName=..\..\x86\iVU0micro.c -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit88] -FileName=..\..\x86\iVU0micro.h -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit89] -FileName=..\..\x86\iVU1micro.c -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit90] -FileName=..\..\x86\iVU1micro.h -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit91] -FileName=..\..\x86\iVUmicro.c -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit92] -FileName=..\..\x86\iVUmicro.h -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit93] -FileName=..\..\x86\iVUops.h -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit94] -FileName=..\..\x86\recCOP2.c -CompileCpp=0 -Folder=ix86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit95] -FileName=..\..\x86\ix86\ix86.c -CompileCpp=0 -Folder=ix86/x86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit96] -FileName=..\..\x86\ix86\ix86.h -CompileCpp=0 -Folder=ix86/x86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit97] -FileName=..\..\x86\ix86\ix86_3dnow.c -CompileCpp=0 -Folder=ix86/x86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit98] -FileName=..\..\x86\ix86\ix86_cpudetect.c -CompileCpp=0 -Folder=ix86/x86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit99] -FileName=..\..\x86\ix86\ix86_fpu.c -CompileCpp=0 -Folder=ix86/x86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit100] -FileName=..\..\x86\ix86\ix86_mmx.c -CompileCpp=0 -Folder=ix86/x86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit101] -FileName=..\..\x86\ix86\ix86_sse.c -CompileCpp=0 -Folder=ix86/x86 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit102] -FileName=..\..\CDVD.c -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit103] -FileName=..\..\CDVD.h -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit104] -FileName=..\..\CDVDiso.c -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit105] -FileName=..\..\CDVDiso.h -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit106] -FileName=..\..\CDVDisodrv.c -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit107] -FileName=..\..\CDVDisodrv.h -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit108] -FileName=..\..\CDVDlib.h -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit109] -FileName=..\..\Common.h -CompileCpp=0 -Folder= -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit110] -FileName=..\..\COP0.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit111] -FileName=..\..\COP0.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit112] -FileName=..\..\Counters.c -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit113] -FileName=..\..\Counters.h -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit114] -FileName=..\..\Decode_XA.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit115] -FileName=..\..\Decode_XA.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit116] -FileName=..\..\EEregs.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit117] -FileName=..\..\Elfheader.c -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit118] -FileName=..\..\Elfheader.h -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit119] -FileName=..\..\FiFo.c -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit120] -FileName=..\..\FPU.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit121] -FileName=..\..\GS.c -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit122] -FileName=..\..\GS.h -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit123] -FileName=..\..\Gte.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit124] -FileName=..\..\Gte.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit125] -FileName=..\..\Hw.c -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit126] -FileName=..\..\Hw.h -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit127] -FileName=..\..\Interpreter.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit128] -FileName=..\..\InterTables.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit129] -FileName=..\..\InterTables.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit130] -FileName=..\..\Mdec.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit131] -FileName=..\..\Mdec.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit132] -FileName=..\..\Memory.c -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit133] -FileName=..\..\Memory.h -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit134] -FileName=..\..\Misc.c -CompileCpp=0 -Folder=misc -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit135] -FileName=..\..\Misc.h -CompileCpp=0 -Folder=misc -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit136] -FileName=..\..\MMI.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit137] -FileName=..\..\Patch.c -CompileCpp=0 -Folder=misc -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit138] -FileName=..\..\Patch.h -CompileCpp=0 -Folder=misc -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit139] -FileName=..\..\Plugins.c -CompileCpp=0 -Folder=plugins -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit140] -FileName=..\..\Plugins.h -CompileCpp=0 -Folder=plugins -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit141] -FileName=..\..\PS2Edefs.h -CompileCpp=0 -Folder=plugins -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit142] -FileName=..\..\PS2Etypes.h -CompileCpp=0 -Folder=plugins -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit143] -FileName=..\..\PsxBios2.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit144] -FileName=..\..\PsxBios.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit145] -FileName=..\..\PsxBios.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit146] -FileName=..\..\PsxCommon.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit147] -FileName=..\..\PsxCounters.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit148] -FileName=..\..\PsxCounters.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit149] -FileName=..\..\PsxDma.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit150] -FileName=..\..\PsxDma.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit151] -FileName=..\..\PsxGPU.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit152] -FileName=..\..\PsxGPU.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit153] -FileName=..\..\PsxHw.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit154] -FileName=..\..\PsxHw.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit155] -FileName=..\..\PsxInterpreter.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit156] -FileName=..\..\PsxMem.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit157] -FileName=..\..\PsxMem.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit158] -FileName=..\..\PsxSio2.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit159] -FileName=..\..\PsxSio2.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit160] -FileName=..\..\R3000A.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit161] -FileName=..\..\R3000A.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit162] -FileName=..\..\R5900.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit163] -FileName=..\..\R5900.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit164] -FileName=..\..\Sif.c -CompileCpp=0 -Folder=Sif -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit165] -FileName=..\..\Sif.h -CompileCpp=0 -Folder=Sif -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit166] -FileName=..\..\Sifcmd.h -CompileCpp=0 -Folder=Sif -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit167] -FileName=..\..\Sio.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit168] -FileName=..\..\Sio.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit169] -FileName=..\..\SPR.c -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit170] -FileName=..\..\SPR.h -CompileCpp=0 -Folder=Hardware -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit171] -FileName=..\..\Stats.c -CompileCpp=0 -Folder=misc -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit172] -FileName=..\..\Stats.h -CompileCpp=0 -Folder=misc -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit173] -FileName=..\..\System.h -CompileCpp=0 -Folder= -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit174] -FileName=..\..\Vif.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit175] -FileName=..\..\Vif.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit176] -FileName=..\..\VifDma.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit177] -FileName=..\..\VifDma.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit178] -FileName=..\..\VU0.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit179] -FileName=..\..\VU0.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit180] -FileName=..\..\VU0micro.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit181] -FileName=..\..\VU1micro.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit182] -FileName=..\..\VU.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit183] -FileName=..\..\VUflags.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit184] -FileName=..\..\VUflags.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit185] -FileName=..\..\VUmicro.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit186] -FileName=..\..\VUops.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit187] -FileName=..\..\VUops.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit188] -FileName=..\..\Cache.c -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit189] -FileName=..\..\Cache.h -CompileCpp=0 -Folder=cpu -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit190] -FileName=..\..\CdRom.c -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit191] -FileName=..\..\CdRom.h -CompileCpp=0 -Folder=IOP_CPU -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit192] -FileName=..\Cdrom02.ico -Folder=GUI -Compile=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit193] -FileName=..\..\pcsxAbout.bmp -Folder=GUI -Compile=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[VersionInfo] -Major=0 -Minor=1 -Release=1 -Build=1 -LanguageID=1033 -CharsetID=1252 -CompanyName= -FileVersion= -FileDescription=Developed using the Dev-C++ IDE -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion= -AutoIncBuildNr=0 - -[Unit194] -FileName=..\..\RDebug\deci2.c -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit195] -FileName=..\..\RDebug\deci2.h -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit196] -FileName=..\..\RDebug\deci2_dbgp.c -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit197] -FileName=..\..\RDebug\deci2_dbgp.h -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit198] -FileName=..\..\RDebug\deci2_dcmp.c -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit199] -FileName=..\..\RDebug\deci2_dcmp.h -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit202] -FileName=..\..\RDebug\deci2_netmp.c -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit203] -FileName=..\..\RDebug\deci2_netmp.h -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit204] -FileName=..\..\RDebug\deci2_ttyp.c -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit205] -FileName=..\..\RDebug\deci2_ttyp.h -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit206] -FileName=..\..\RDebug\deci2_ttyp.c -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit207] -FileName=..\..\RDebug\deci2_ttyp.h -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit200] -FileName=..\..\RDebug\deci2_iloadp.c -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit201] -FileName=..\..\RDebug\deci2_iloadp.h -CompileCpp=0 -Folder=DECI2 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - diff --git a/pcsx2v2/windows/mingw/pcsx2.layout b/pcsx2v2/windows/mingw/pcsx2.layout deleted file mode 100644 index eb0d940..0000000 --- a/pcsx2v2/windows/mingw/pcsx2.layout +++ /dev/null @@ -1,1424 +0,0 @@ -[Editor_0] -CursorCol=1 -CursorRow=24 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_1] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_4] -CursorCol=1 -CursorRow=95 -TopLine=54 -LeftChar=1 -Open=1 -Top=1 -[Editor_3] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_5] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_6] -CursorCol=2 -CursorRow=239 -TopLine=193 -LeftChar=1 -Open=0 -Top=0 -[Editor_8] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_9] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_7] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_10] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_11] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_12] -CursorCol=1 -CursorRow=19 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_13] -CursorCol=20 -CursorRow=172 -TopLine=132 -LeftChar=1 -Open=0 -Top=0 -[Editor_14] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_15] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_16] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_17] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_2] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_19] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_20] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_22] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_23] -CursorCol=1 -CursorRow=175 -TopLine=146 -LeftChar=1 -Open=0 -Top=0 -[Editor_24] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_25] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_26] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_21] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_27] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_28] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_29] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_31] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_30] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_32] -CursorCol=48 -CursorRow=360 -TopLine=315 -LeftChar=1 -Open=0 -Top=0 -[Editor_33] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_34] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_35] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_36] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_37] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_38] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_39] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_40] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_41] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_42] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_43] -CursorCol=8 -CursorRow=841 -TopLine=812 -LeftChar=1 -Open=0 -Top=0 -[Editor_44] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_45] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_46] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_47] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_48] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_49] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_50] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_51] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_52] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_53] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_54] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_55] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_56] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_57] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_58] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_59] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_60] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_61] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_62] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_63] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_64] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_65] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_66] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_67] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_68] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_69] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_70] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_71] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_72] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_73] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_74] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_75] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_76] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_77] -CursorCol=18 -CursorRow=24 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_78] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_79] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_80] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_81] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_82] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_83] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_84] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_85] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_86] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_87] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_88] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_89] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_90] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_91] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_92] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_93] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_113] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_114] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_189] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_190] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_187] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_188] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_135] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_143] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_126] -CursorCol=1 -CursorRow=515 -TopLine=496 -LeftChar=1 -Open=0 -Top=0 -[Editor_127] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_128] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_133] -CursorCol=1 -CursorRow=684 -TopLine=643 -LeftChar=1 -Open=0 -Top=0 -[Editor_134] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_136] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_137] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_138] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_139] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_140] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_141] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_145] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_144] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_142] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_146] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_147] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_150] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_152] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_154] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_132] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_148] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_149] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_151] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_153] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_155] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_156] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_157] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_158] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_159] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_160] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_161] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_162] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_173] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_174] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_175] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_176] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_181] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_177] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_178] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_179] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_180] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_182] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_183] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_184] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_185] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_186] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_119] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_131] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_124] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_125] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_122] -CursorCol=17 -CursorRow=207 -TopLine=197 -LeftChar=1 -Open=0 -Top=0 -[Editor_123] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_129] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_130] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_163] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_164] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_166] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_167] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_109] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_110] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_192] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_170] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_168] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_169] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_165] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_111] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_112] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_101] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_102] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_103] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_104] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_105] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_106] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_107] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_115] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_116] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_117] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_118] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_120] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_121] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editor_171] -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -Open=0 -Top=0 -[Editors] -Focused=-1 -Order=-1 -[Editor_18] -Open=0 -Top=0 -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -[Editor_94] -Open=0 -Top=0 -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -[Editor_95] -Open=0 -Top=0 -[Editor_96] -Open=0 -Top=0 -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -[Editor_97] -Open=1 -Top=0 -CursorCol=28 -CursorRow=477 -TopLine=439 -LeftChar=1 -[Editor_98] -Open=0 -Top=0 -[Editor_99] -Open=0 -Top=0 -CursorCol=1 -CursorRow=337 -TopLine=296 -LeftChar=1 -[Editor_100] -Open=0 -Top=0 -[Editor_108] -Open=0 -Top=0 -CursorCol=3 -CursorRow=3 -TopLine=1 -LeftChar=1 -[Editor_172] -Open=0 -Top=0 -[Editor_191] -Open=0 -Top=0 -[Editor_193] -Open=0 -Top=0 -CursorCol=20 -CursorRow=23 -TopLine=1 -LeftChar=1 -[Editor_194] -Open=0 -Top=0 -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -[Editor_195] -Open=0 -Top=0 -CursorCol=1 -CursorRow=349 -TopLine=1 -LeftChar=1 -[Editor_196] -Open=0 -Top=0 -[Editor_197] -Open=0 -Top=0 -CursorCol=6 -CursorRow=42 -TopLine=37 -LeftChar=1 -[Editor_198] -Open=0 -Top=0 -CursorCol=6 -CursorRow=25 -TopLine=1 -LeftChar=1 -[Editor_199] -Open=0 -Top=0 -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -[Editor_200] -Open=0 -Top=0 -CursorCol=1 -CursorRow=1 -TopLine=1 -LeftChar=1 -[Editor_201] -Open=0 -Top=0 -CursorCol=21 -CursorRow=133 -TopLine=89 -LeftChar=1 -[Editor_202] -Open=0 -Top=0 -CursorCol=9 -CursorRow=27 -TopLine=1 -LeftChar=1 -[Editor_203] -Open=0 -Top=0 -CursorCol=21 -CursorRow=40 -TopLine=1 -LeftChar=1 -[Editor_204] -Open=0 -Top=0 -CursorCol=9 -CursorRow=27 -TopLine=1 -LeftChar=1 -[Editor_205] -Open=1 -Top=0 -CursorCol=21 -CursorRow=40 -TopLine=1 -LeftChar=1 -[Editor_206] -Open=0 -Top=0 diff --git a/pcsx2v2/windows/mingw/pcsx2_private.h b/pcsx2v2/windows/mingw/pcsx2_private.h deleted file mode 100644 index 2e8cf9d..0000000 --- a/pcsx2v2/windows/mingw/pcsx2_private.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ -/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */ -/* DO NOT EDIT ! */ - -#ifndef PCSX2_PRIVATE_H -#define PCSX2_PRIVATE_H - -/* VERSION DEFINITIONS */ -#define VER_STRING "0.1.1.1" -#define VER_MAJOR 0 -#define VER_MINOR 1 -#define VER_RELEASE 1 -#define VER_BUILD 1 -#define COMPANY_NAME "" -#define FILE_VERSION "" -#define FILE_DESCRIPTION "Developed using the Dev-C++ IDE" -#define INTERNAL_NAME "" -#define LEGAL_COPYRIGHT "" -#define LEGAL_TRADEMARKS "" -#define ORIGINAL_FILENAME "" -#define PRODUCT_NAME "" -#define PRODUCT_VERSION "" - -#endif /*PCSX2_PRIVATE_H*/ diff --git a/pcsx2v2/windows/mingw/pcsx2_private.rc b/pcsx2v2/windows/mingw/pcsx2_private.rc deleted file mode 100644 index aea0afe..0000000 --- a/pcsx2v2/windows/mingw/pcsx2_private.rc +++ /dev/null @@ -1,5 +0,0 @@ -/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */ -/* DO NOT EDIT! */ - -#include "../pcsx2.rc" - diff --git a/pcsx2v2/x86/Makefile.am b/pcsx2v2/x86/Makefile.am deleted file mode 100644 index bfdbe8c..0000000 --- a/pcsx2v2/x86/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -INCLUDES = -I@srcdir@/../ -noinst_LIBRARIES = libx86recomp.a - -# have to add the sources instead of making a library since the linking is complicated -if X86_64 -archfiles = ix86-64/iR5900-64.c ix86-64/iR5900AritImm-64.c ix86-64/iR5900Jump-64.c \ -ix86-64/iR5900Move-64.c ix86-64/iR5900Shift-64.c ix86-64/iR5900Arit-64.c ix86-64/iR5900Branch-64.c \ -ix86-64/iR5900LoadStore-64.c ix86-64/iR5900MultDiv-64.c ix86-64/iCore-64.cpp ix86-64/aR5900-64.S -else -archfiles = ix86-32/iR5900-32.c ix86-32/iR5900AritImm.c ix86-32/iR5900Jump.c \ -ix86-32/iR5900Move.c ix86-32/iR5900Shift.c ix86-32/iR5900Arit.c ix86-32/iR5900Branch.c \ -ix86-32/iR5900LoadStore.c ix86-32/iR5900MultDiv.c ix86-32/iCore-32.cpp ix86-32/aR5900-32.S -endif - -libx86recomp_a_SOURCES = iCOP2.c iCP0.c iFPU.c iHw.c iMMI.c iPsxHw.c iPsxMem.c \ -ir5900tables.c iVU0micro.c iVU1micro.c iVUmicro.c \ -iCore.cpp iGS.cpp iR3000A.cpp iR3000Atables.cpp iVif.cpp iVUzerorec.cpp \ -fast_routines.S aR3000A.S aVUzerorec.S aVif.S $(archfiles) - -libx86recomp_a_DEPENDENCIES = ix86/libix86.a - -SUBDIRS = ix86 diff --git a/pcsx2v2/x86/ix86-64/aR3000A-64.asm b/pcsx2v2/x86/ix86-64/aR3000A-64.asm deleted file mode 100644 index 8c3d9b5..0000000 --- a/pcsx2v2/x86/ix86-64/aR3000A-64.asm +++ /dev/null @@ -1,190 +0,0 @@ -extern psxRegs:abs -extern psxRecLUT:abs -extern psxRecRecompile:near -extern EEsCycle:abs - -.code - -R3000AInterceptor proc public - sub rsp, 48 - jmp rdx -R3000AInterceptor endp - -R3000AExecute proc public - - ;;while (EEsCycle > 0) { - push rbx - push rbp - push rsi - push rdi - push r12 - push r13 - push r14 - push r15 - -Execute_CheckCycles: - cmp dword ptr [EEsCycle], 0 - jle Execute_Exit - - ;;if ( !pblock->pFnptr || (pblock->startpc&PSX_MEMMASK) != (psxRegs.pc&PSX_MEMMASK) ) - ;; psxRecRecompile(psxRegs.pc); - - mov eax, dword ptr [psxRegs + 0208h] - mov ecx, eax - mov r12d, eax - shl rax, 32 - shr rax, 48 - and r12, 0fffch - shl rax, 3 - add rax, [psxRecLUT] - shl r12, 1 - add r12, [rax] - - mov r8d, [r12+4] - mov r9d, ecx - and r8d, 05fffffffh - and r9d, 05fffffffh - cmp r8d, r9d - jne Execute_Recompile - mov edx, [r12] - and rdx, 0fffffffh ;; pFnptr - jnz Execute_Function - -Execute_Recompile: - call psxRecRecompile - mov edx, [r12] - and rdx, 0fffffffh ;; pFnptr - -Execute_Function: - call R3000AInterceptor - - jmp Execute_CheckCycles - -Execute_Exit: - pop r15 - pop r14 - pop r13 - pop r12 - pop rdi - pop rsi - pop rbp - pop rbx - ret - -R3000AExecute endp - -psxDispatcher proc public - - mov [rsp+40], rdx - - mov eax, dword ptr [psxRegs + 0208h] - mov ecx, eax - mov r12d, eax - shl rax, 32 - shr rax, 48 - and r12, 0fffch - shl rax, 3 - add rax, [psxRecLUT] - shl r12, 1 - add r12, [rax] - - - mov eax, ecx - mov edx, [r12+4] - and eax, 5fffffffh - and edx, 5fffffffh - cmp eax, edx - je psxDispatcher_CheckPtr - - call psxRecRecompile -psxDispatcher_CheckPtr: - mov r12d, dword ptr [r12] - - and r12, 00fffffffh - mov rdx, r12 - mov rcx, [rsp+40] - sub rdx, rcx - sub rdx, 4 - mov [rcx], edx - - jmp r12 -psxDispatcher endp - -psxDispatcherClear proc public - - mov dword ptr [psxRegs + 0208h], edx - mov eax, edx - - - - mov r12d, edx - shl rax, 32 - shr rax, 48 - and r12, 0fffch - shl rax, 3 - add rax, [psxRecLUT] - shl r12, 1 - add r12, [rax] - - - mov ecx, edx - mov eax, ecx - mov edx, [r12+4] - and eax, 5fffffffh - and edx, 5fffffffh - cmp eax, edx - jne psxDispatcherClear_Recompile - - mov eax, dword ptr [r12] - - and rax, 00fffffffh - jmp rax - -psxDispatcherClear_Recompile: - call psxRecRecompile - mov eax, dword ptr [r12] - - - and rax, 00fffffffh - mov byte ptr [r15], 0e9h - mov rdx, rax - sub rdx, r15 - sub rdx, 5 - mov [r15+1], edx - - jmp rax -psxDispatcherClear endp - - -psxDispatcherReg proc public - - mov eax, dword ptr [psxRegs + 0208h] - mov ecx, eax - mov r12d, eax - shl rax, 32 - shr rax, 48 - and r12, 0fffch - shl rax, 3 - add rax, [psxRecLUT] - shl r12, 1 - add r12, [rax] - - - cmp ecx, dword ptr [r12+4] - jne psxDispatcherReg_recomp - - mov r12d, dword ptr [r12] - - and r12, 00fffffffh - jmp r12 - -psxDispatcherReg_recomp: - call psxRecRecompile - - mov eax, dword ptr [r12] - and rax, 00fffffffh - jmp rax - -psxDispatcherReg endp - -end diff --git a/pcsx2v2/x86/ix86-64/aR5900-64.S b/pcsx2v2/x86/ix86-64/aR5900-64.S deleted file mode 100644 index 0f1c361..0000000 --- a/pcsx2v2/x86/ix86-64/aR5900-64.S +++ /dev/null @@ -1,249 +0,0 @@ -// iR5900.c assembly routines -// zerofrog(@gmail.com) -.intel_syntax - -.extern cpuRegs -.extern recRecompile -.extern recLUT -.extern lbase -.extern s_pCurBlock_ltime -.extern g_EEFreezeRegs - -#define BLOCKTYPE_STARTPC 4 // startpc offset -#define BLOCKTYPE_DELAYSLOT 1 // if bit set, delay slot - -#define BASEBLOCK_SIZE 2 // in dwords -#define PCOFFSET 0x2a8 - -#define REG_PC %edi -#define REG_BLOCK %r14 // preserved across calls -#define REG_BLOCKd %r14d - -.globl R5900Execute -R5900Execute: - push %rbx - push %rbp - push %r12 - push %r13 - push %r14 - push %r15 - - // calc PC_GETBLOCK - // ((BASEBLOCK*)(recLUT[((u32)(x)) >> 16] + (sizeof(BASEBLOCK)/4)*((x) & 0xffff))) - mov %eax, dword ptr [cpuRegs + PCOFFSET] - mov REG_PC, %eax - mov REG_BLOCKd, %eax - shl %rax, 32 - shr %rax, 48 - and REG_BLOCK, 0xfffc - shl %rax, 3 - add %rax, [recLUT] - shl REG_BLOCK, 1 - add REG_BLOCK, [%rax] - - // g_EEFreezeRegs = 1; - mov dword ptr [g_EEFreezeRegs], 1 - - cmp REG_PC, [REG_BLOCK+4] - jne Execute_Recompile - mov %edx, [REG_BLOCK] - and %rdx, 0xfffffff // pFnptr - jnz Execute_Function - -Execute_Recompile: - call recRecompile - mov %edx, [REG_BLOCK] - and %rdx, 0xfffffff // pFnptr - -Execute_Function: - call %rdx - - // g_EEFreezeRegs = 0; - mov dword ptr [g_EEFreezeRegs], 0 - - pop %r15 - pop %r14 - pop %r13 - pop %r12 - pop %rbp - pop %rbx - - ret - -.globl Dispatcher -Dispatcher: - // EDX contains the jump addr to modify - push %rdx - - // calc PC_GETBLOCK - // ((BASEBLOCK*)(recLUT[((u32)(x)) >> 16] + (sizeof(BASEBLOCK)/4)*((x) & 0xffff))) - mov %eax, dword ptr [cpuRegs + PCOFFSET] - mov REG_PC, %eax - mov REG_BLOCKd, %eax - shl %rax, 32 - shr %rax, 48 - and REG_BLOCK, 0xfffc - shl %rax, 3 - add %rax, [recLUT] - shl REG_BLOCK, 1 - add REG_BLOCK, [%rax] - - // check if startpc == cpuRegs.pc - //and %ecx, 0x5fffffff // remove higher bits - cmp REG_PC, dword ptr [REG_BLOCK+BLOCKTYPE_STARTPC] - je Dispatcher_CheckPtr - - // recompile - call recRecompile -Dispatcher_CheckPtr: - mov REG_BLOCKd, dword ptr [REG_BLOCK] - -#ifdef _DEBUG - test REG_BLOCKd, REG_BLOCKd - jnz Dispatcher_CallFn - // throw an exception - int 10 - -Dispatcher_CallFn: -#endif - - and REG_BLOCK, 0x0fffffff - mov %rdx, REG_BLOCK - pop %rcx // x86Ptr to mod - sub %rdx, %rcx - sub %rdx, 4 - mov [%rcx], %edx - - jmp REG_BLOCK - - -.globl DispatcherClear -DispatcherClear: - // EDX contains the current pc - mov dword ptr [cpuRegs + PCOFFSET], %edx - mov %eax, %edx - - // calc PC_GETBLOCK - // ((BASEBLOCK*)(recLUT[((u32)(x)) >> 16] + (sizeof(BASEBLOCK)/4)*((x) & 0xffff))) - mov REG_BLOCKd, %edx - shl %rax, 32 - shr %rax, 48 - and REG_BLOCK, 0xfffc - shl %rax, 3 - add %rax, [recLUT] - shl REG_BLOCK, 1 - add REG_BLOCK, [%rax] - - cmp %edx, dword ptr [REG_BLOCK + BLOCKTYPE_STARTPC] - jne DispatcherClear_Recompile - - mov %eax, dword ptr [REG_BLOCK] - -#ifdef _DEBUG - test %eax, %eax - jnz DispatcherClear_CallFn - // throw an exception - int 10 - -DispatcherClear_CallFn: -#endif - - and %rax, 0x0fffffff - jmp %rax - -DispatcherClear_Recompile: - mov REG_PC, %edx - call recRecompile - mov %eax, dword ptr [REG_BLOCK] - - // r15 holds the prev x86 pointer - and %rax, 0x0fffffff - mov byte ptr [%r15], 0xe9 // jmp32 - mov %rdx, %rax - sub %rdx, %r15 - sub %rdx, 5 - mov [%r15+1], %edx - - jmp %rax - - - -// called when jumping to variable pc address -.globl DispatcherReg -DispatcherReg: - //s_pDispatchBlock = PC_GETBLOCK(cpuRegs.pc) - mov %eax, dword ptr [cpuRegs + PCOFFSET] - mov REG_PC, %eax - mov REG_BLOCKd, %eax - shl %rax, 32 - shr %rax, 48 - and REG_BLOCK, 0xfffc - shl %rax, 3 - add %rax, [recLUT] - shl REG_BLOCK, 1 - add REG_BLOCK, [%rax] - - // check if startpc == cpuRegs.pc - //and %eax, 0x5fffffff // remove higher bits - cmp REG_PC, dword ptr [REG_BLOCK+BLOCKTYPE_STARTPC] - jne DispatcherReg_recomp - - mov REG_BLOCKd, dword ptr [REG_BLOCK] - -#ifdef _DEBUG - test REG_BLOCKd, REG_BLOCKd - jnz CallFn2 - // throw an exception - int 10 - -CallFn2: - -#endif - - and REG_BLOCK, 0x0fffffff - jmp REG_BLOCK // fnptr - -DispatcherReg_recomp: - call recRecompile - - mov %eax, dword ptr [REG_BLOCK] - and %rax, 0x0fffffff - jmp %rax // fnptr - - -.globl _StartPerfCounter -_StartPerfCounter: - - push %rax - push %rbx - push %rcx - - rdtsc - mov dword ptr [lbase], %eax - mov dword ptr [lbase + 4], %edx - - pop %rcx - pop %rbx - pop %rax - ret - -.globl _StopPerfCounter -_StopPerfCounter: - - push %rax - push %rbx - push %rcx - - rdtsc - - sub %eax, dword ptr [lbase] - sbb %edx, dword ptr [lbase + 4] - mov %ecx, s_pCurBlock_ltime - add %eax, dword ptr [%ecx] - adc %edx, dword ptr [%ecx + 4] - mov dword ptr [%ecx], %eax - mov dword ptr [%ecx + 4], %edx - pop %rcx - pop %rbx - pop %rax - ret diff --git a/pcsx2v2/x86/ix86-64/aR5900-64.asm b/pcsx2v2/x86/ix86-64/aR5900-64.asm deleted file mode 100644 index 4f026c9..0000000 --- a/pcsx2v2/x86/ix86-64/aR5900-64.asm +++ /dev/null @@ -1,261 +0,0 @@ -extern cpuRegs:abs -extern recRecompile:near -extern recLUT:abs -extern lbase:abs -extern s_pCurBlock_ltime:abs - -extern g_globalXMMData:abs -extern g_globalXMMSaved:abs -extern g_EEFreezeRegs:abs - -.code - -FreezeXMMRegs_ proc public - ;;assert( g_EEFreezeRegs ); - test ecx, ecx - jz XMMRestore - - cmp byte ptr [g_globalXMMSaved], 0 - jne XMMSaveEnd - - mov byte ptr [g_globalXMMSaved], 1 - - movaps xmmword ptr [g_globalXMMData + 000h], xmm0 - movaps xmmword ptr [g_globalXMMData + 010h], xmm1 - movaps xmmword ptr [g_globalXMMData + 020h], xmm2 - movaps xmmword ptr [g_globalXMMData + 030h], xmm3 - movaps xmmword ptr [g_globalXMMData + 040h], xmm4 - movaps xmmword ptr [g_globalXMMData + 050h], xmm5 - movaps xmmword ptr [g_globalXMMData + 060h], xmm6 - movaps xmmword ptr [g_globalXMMData + 070h], xmm7 - -XMMSaveEnd: - ret - -XMMRestore: - - cmp byte ptr [g_globalXMMSaved], 0 - je XMMSaveEnd - - mov byte ptr [g_globalXMMSaved], 0 - - ;; TODO: really need to backup all regs? - movaps xmm0, xmmword ptr [g_globalXMMData + 000h] - movaps xmm1, xmmword ptr [g_globalXMMData + 010h] - movaps xmm2, xmmword ptr [g_globalXMMData + 020h] - movaps xmm3, xmmword ptr [g_globalXMMData + 030h] - movaps xmm4, xmmword ptr [g_globalXMMData + 040h] - movaps xmm5, xmmword ptr [g_globalXMMData + 050h] - movaps xmm6, xmmword ptr [g_globalXMMData + 060h] - movaps xmm7, xmmword ptr [g_globalXMMData + 070h] - -XMMRestoreEnd: - ret - -FreezeXMMRegs_ endp - -R5900Interceptor proc public - sub rsp, 48 - jmp rdx -R5900Interceptor endp - -R5900Execute proc public - - push rbx - push rbp - push rsi - push rdi - push r12 - push r13 - push r14 - push r15 - - ;;BASEBLOCK* pblock = PC_GETBLOCK(cpuRegs.pc); - mov eax, dword ptr [cpuRegs + 02a8h] - mov ecx, eax - mov r14d, eax - shl rax, 32 - shr rax, 48 - and r14, 0fffch - shl rax, 3 - add rax, [recLUT] - shl r14, 1 - add r14, [rax] - - ;; g_EEFreezeRegs = 1; - mov dword ptr [g_EEFreezeRegs], 1 - - cmp ecx, [r14+4] - jne Execute_Recompile - mov edx, [r14] - and rdx, 0fffffffh ;; pFnptr - jnz Execute_Function - -Execute_Recompile: - call recRecompile - mov edx, [r14] - and rdx, 0fffffffh ;; pFnptr - -Execute_Function: - call R5900Interceptor - - ;; g_EEFreezeRegs = 0; - mov dword ptr [g_EEFreezeRegs], 0 - - pop r15 - pop r14 - pop r13 - pop r12 - pop rdi - pop rsi - pop rbp - pop rbx - - ret - -R5900Execute endp - -Dispatcher proc public - - mov [rsp+40], rdx - - mov eax, dword ptr [cpuRegs + 02a8h] - mov ecx, eax - mov r14d, eax - shl rax, 32 - shr rax, 48 - and r14, 0fffch - shl rax, 3 - add rax, [recLUT] - shl r14, 1 - add r14, [rax] - - - - cmp ecx, dword ptr [r14+4] - je Dispatcher_CheckPtr - - - call recRecompile -Dispatcher_CheckPtr: - mov r14d, dword ptr [r14] - - and r14, 0fffffffh - mov rdx, r14 - mov rcx, [rsp+40] - sub rdx, rcx - sub rdx, 4 - mov [rcx], edx - - jmp r14 -Dispatcher endp - -DispatcherClear proc public - - mov dword ptr [cpuRegs + 02a8h], edx - mov eax, edx - - - - mov r14d, edx - shl rax, 32 - shr rax, 48 - and r14, 0fffch - shl rax, 3 - add rax, [recLUT] - shl r14, 1 - add r14, [rax] - - cmp edx, dword ptr [r14 + 4] - jne DispatcherClear_Recompile - - mov eax, dword ptr [r14] - - and rax, 0fffffffh - jmp rax - -DispatcherClear_Recompile: - mov ecx, edx - call recRecompile - mov eax, dword ptr [r14] - - - and rax, 0fffffffh - mov byte ptr [r15], 0e9h - mov rdx, rax - sub rdx, r15 - sub rdx, 5 - mov [r15+1], edx - - jmp rax -DispatcherClear endp - - - -DispatcherReg proc public - - mov eax, dword ptr [cpuRegs + 02a8h] - mov ecx, eax - mov r14d, eax - shl rax, 32 - shr rax, 48 - and r14, 0fffch - shl rax, 3 - add rax, [recLUT] - shl r14, 1 - add r14, [rax] - - - - cmp ecx, dword ptr [r14+4] - jne DispatcherReg_recomp - - mov r14d, dword ptr [r14] - - and r14, 0fffffffh - jmp r14 - -DispatcherReg_recomp: - call recRecompile - - mov eax, dword ptr [r14] - and rax, 0fffffffh - jmp rax -DispatcherReg endp - -_StartPerfCounter proc public - push rax - push rbx - push rcx - - rdtsc - mov dword ptr [lbase], eax - mov dword ptr [lbase + 4], edx - - pop rcx - pop rbx - pop rax - ret -_StartPerfCounter endp - -_StopPerfCounter proc public - push rax - push rbx - push rcx - - rdtsc - - sub eax, dword ptr [lbase] - sbb edx, dword ptr [lbase + 4] - mov ecx, [s_pCurBlock_ltime] - add eax, dword ptr [ecx] - adc edx, dword ptr [ecx + 4] - mov dword ptr [ecx], eax - mov dword ptr [ecx + 4], edx - pop rcx - pop rbx - pop rax - ret -_StopPerfCounter endp - -end diff --git a/pcsx2v2/x86/ix86-64/aVUzerorec-64.asm b/pcsx2v2/x86/ix86-64/aVUzerorec-64.asm deleted file mode 100644 index 4bf72c1..0000000 --- a/pcsx2v2/x86/ix86-64/aVUzerorec-64.asm +++ /dev/null @@ -1,126 +0,0 @@ -;; iR3000A.c assembly routines -;; zerofrog(@gmail.com) -extern svudispfntemp:near -extern QueryPerformanceCounter:near -extern s_TotalVUCycles:abs -extern s_callstack:ptr -extern s_vu1esp:abs -extern s_writeQ:abs -extern s_writeP:abs -extern g_curdebugvu:abs -extern SuperVUGetProgram:near -extern SuperVUCleanupProgram:near -extern g_sseVUMXCSR:abs -extern g_sseMXCSR:abs - -extern svubase:abs - -.code - -;; SuperVUExecuteProgram(u32 startpc, int vuindex) -SuperVUExecuteProgram proc public - - ;; uncomment only if SUPERVU_COUNT is defined - ;; { - ;push rcx - ;push rdx - ;mov rcx, svubase - ;sub rsp,32 - ;call QueryPerformanceCounter - ;add rsp,32 - ;pop rdx - ;pop rcx - ;; } - - mov rax, [rsp] - mov dword ptr [s_TotalVUCycles], 0 - - sub rsp, 48-8+80 - mov [rsp+48], rcx - mov [rsp+56], rdx - - mov [s_callstack], rax - - call SuperVUGetProgram - - mov [rsp+64], rbp - mov [rsp+72], rsi - mov [rsp+80], rdi - mov [rsp+88], rbx - mov [rsp+96], r12 - mov [rsp+104], r13 - mov [rsp+112], r14 - mov [rsp+120], r15 - - ;; _DEBUG - ;;mov [s_vu1esp], rsp - - ldmxcsr [g_sseVUMXCSR] - mov dword ptr [s_writeQ], 0ffffffffh - mov dword ptr [s_writeP], 0ffffffffh - jmp rax -SuperVUExecuteProgram endp - -SuperVUEndProgram proc public - ;; restore cpu state - ldmxcsr [g_sseMXCSR] - - mov rcx, [rsp+48] - mov rdx, [rsp+56] - mov rbp, [rsp+64] - mov rsi, [rsp+72] - mov rdi, [rsp+80] - mov rbx, [rsp+88] - mov r12, [rsp+96] - mov r13, [rsp+104] - mov r14, [rsp+112] - mov r15, [rsp+120] - - ;; _DEBUG - ;;sub [s_vu1esp], rsp - - add rsp, 128-32 - call SuperVUCleanupProgram - add rsp, 32 - jmp [s_callstack] ;; so returns correctly -SuperVUEndProgram endp - -svudispfn proc public - mov [g_curdebugvu], rax - push rcx - push rdx - push rbp - push rsi - push rdi - push rbx - push r8 - push r9 - push r10 - push r11 - push r12 - push r13 - push r14 - push r15 - - sub rsp, 32 - call svudispfntemp - add rsp, 32 - - pop r15 - pop r14 - pop r13 - pop r12 - pop r11 - pop r10 - pop r9 - pop r8 - pop rbx - pop rdi - pop rsi - pop rbp - pop rdx - pop rcx - ret -svudispfn endp - -end diff --git a/pcsx2v2/x86/ix86-64/aVif_proc-64.asm b/pcsx2v2/x86/ix86-64/aVif_proc-64.asm deleted file mode 100644 index d263b48..0000000 --- a/pcsx2v2/x86/ix86-64/aVif_proc-64.asm +++ /dev/null @@ -1,1827 +0,0 @@ -extern _vifRegs:abs -extern _vifMaskRegs:abs -extern _vifRow:abs -extern _vifCol:abs -extern s_TempDecompress:abs - - -.code - -UNPACK_Write0_Regular macro r0, CL, DEST_OFFSET, MOVDQA - MOVDQA [rcx+DEST_OFFSET], r0 - endm - -UNPACK_Write1_Regular macro r0, CL, DEST_OFFSET, MOVDQA - MOVDQA [rcx], r0 - add rcx, rdi - endm - -UNPACK_Write0_Mask macro r0, CL, DEST_OFFSET, MOVDQA - UNPACK_Write0_Regular r0, CL, DEST_OFFSET, MOVDQA - endm - -UNPACK_Write1_Mask macro r0, CL, DEST_OFFSET, MOVDQA - UNPACK_Write1_Regular r0, CL, DEST_OFFSET, MOVDQA - endm - - -UNPACK_Write0_WriteMask macro r0, CL, DEST_OFFSET, MOVDQA - - movdqa xmm3, [rax + 64*(CL) + 48] - pand r0, xmm3 - pandn xmm3, [rcx] - por r0, xmm3 - MOVDQA [rcx], r0 - add rcx, 16 - endm - - -UNPACK_Write1_WriteMask macro r0, CL, DEST_OFFSET, MOVDQA - - movdqa xmm3, [rax + 64*(0) + 48] - pand r0, xmm3 - pandn xmm3, [rcx] - por r0, xmm3 - MOVDQA [rcx], r0 - add rcx, rdi - endm - -UNPACK_Mask_SSE_0 macro r0 - pand r0, xmm3 - por r0, xmm5 - endm - - - - -UNPACK_Mask_SSE_1 macro r0 - - pand r0, xmm3 - por r0, xmm5 - pand xmm3, xmm6 - paddd r0, xmm3 - endm - - - -UNPACK_Mask_SSE_2 macro r0 - - - pand r0, xmm3 - pand xmm3, xmm6 - paddd xmm6, r0 - por r0, xmm5 - paddd r0, xmm3 - endm - -UNPACK_WriteMask_SSE_0 macro r0 - UNPACK_Mask_SSE_0 r0 - endm -UNPACK_WriteMask_SSE_1 macro r0 - UNPACK_Mask_SSE_1 r0 - endm -UNPACK_WriteMask_SSE_2 macro r0 - UNPACK_Mask_SSE_2 r0 - endm - -UNPACK_Regular_SSE_0 macro r0 - endm - -UNPACK_Regular_SSE_1 macro r0 - paddd r0, xmm6 - endm - -UNPACK_Regular_SSE_2 macro r0 - paddd r0, xmm6 - movdqa xmm6, r0 - endm - - -UNPACK_Setup_Mask_SSE macro CL - mov rax, [_vifMaskRegs] - movdqa xmm4, [rax + 64*(CL) + 16] - movdqa xmm5, [rax + 64*(CL) + 32] - movdqa xmm3, [rax + 64*(CL)] - pand xmm4, xmm6 - pand xmm5, xmm7 - por xmm5, xmm4 - endm - -UNPACK_Start_Setup_Mask_SSE_0 macro CL - UNPACK_Setup_Mask_SSE CL - endm - -UNPACK_Start_Setup_Mask_SSE_1 macro CL - mov rax, [_vifMaskRegs] - movdqa xmm4, [rax + 64*(CL) + 16] - movdqa xmm5, [rax + 64*(CL) + 32] - pand xmm4, xmm6 - pand xmm5, xmm7 - por xmm5, xmm4 - endm - -UNPACK_Start_Setup_Mask_SSE_2 macro CL - endm - -UNPACK_Setup_Mask_SSE_0_1 macro CL - endm -UNPACK_Setup_Mask_SSE_1_1 macro CL - mov rax, [_vifMaskRegs] - movdqa xmm3, [rax + 64*(0)] - endm - - -UNPACK_Setup_Mask_SSE_2_1 macro CL - - mov rax, [_vifMaskRegs] - movdqa xmm4, [rax + 64*(0) + 16] - movdqa xmm5, [rax + 64*(0) + 32] - movdqa xmm3, [rax + 64*(0)] - pand xmm4, xmm6 - pand xmm5, xmm7 - por xmm5, xmm4 - endm - -UNPACK_Setup_Mask_SSE_0_0 macro CL - UNPACK_Setup_Mask_SSE CL - endm -UNPACK_Setup_Mask_SSE_1_0 macro CL - UNPACK_Setup_Mask_SSE CL - endm -UNPACK_Setup_Mask_SSE_2_0 macro CL - UNPACK_Setup_Mask_SSE CL - endm - - -UNPACK_Setup_WriteMask_SSE_0_0 macro CL - UNPACK_Setup_Mask_SSE CL - endm -UNPACK_Setup_WriteMask_SSE_1_0 macro CL - UNPACK_Setup_Mask_SSE CL - endm -UNPACK_Setup_WriteMask_SSE_2_0 macro CL - UNPACK_Setup_Mask_SSE CL - endm -UNPACK_Setup_WriteMask_SSE_0_1 macro CL - UNPACK_Setup_Mask_SSE_1_1 CL - endm - -UNPACK_Setup_WriteMask_SSE_1_1 macro CL - UNPACK_Setup_Mask_SSE_1_1 CL - endm - -UNPACK_Setup_WriteMask_SSE_2_1 macro CL - UNPACK_Setup_Mask_SSE_2_1 CL - endm - -UNPACK_Start_Setup_WriteMask_SSE_0 macro CL - UNPACK_Start_Setup_Mask_SSE_1 CL - endm -UNPACK_Start_Setup_WriteMask_SSE_1 macro CL - UNPACK_Start_Setup_Mask_SSE_1 CL - endm -UNPACK_Start_Setup_WriteMask_SSE_2 macro CL - UNPACK_Start_Setup_Mask_SSE_2 CL - endm - -UNPACK_Start_Setup_Regular_SSE_0 macro CL - endm -UNPACK_Start_Setup_Regular_SSE_1 macro CL - endm -UNPACK_Start_Setup_Regular_SSE_2 macro CL - endm -UNPACK_Setup_Regular_SSE_0_0 macro CL - endm -UNPACK_Setup_Regular_SSE_1_0 macro CL - endm -UNPACK_Setup_Regular_SSE_2_0 macro CL - endm -UNPACK_Setup_Regular_SSE_0_1 macro CL - endm -UNPACK_Setup_Regular_SSE_1_1 macro CL - endm -UNPACK_Setup_Regular_SSE_2_1 macro CL - endm - -UNPACK_INC_DST_0_Regular macro qw - add rcx, (16*qw) - endm -UNPACK_INC_DST_1_Regular macro qw - endm -UNPACK_INC_DST_0_Mask macro qw - add rcx, (16*qw) - endm -UNPACK_INC_DST_1_Mask macro qw - endm -UNPACK_INC_DST_0_WriteMask macro qw - endm -UNPACK_INC_DST_1_WriteMask macro qw - endm - - -UNPACK4_SSE macro CL, TOTALCL, MaskType, ModeType - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+0 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm0 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm0, CL, 0, movdqa - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+1 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm1 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm1, CL+1, 16, movdqa - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+2 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm2 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm2, CL+2, 32, movdqa - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+3 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm7 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm7, CL+3, 48, movdqa - - @CatStr(UNPACK_INC_DST_, TOTALCL, _, MaskType) 4 - endm - - -UNPACK3_SSE macro CL, TOTALCL, MaskType, ModeType - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm0 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm0, CL, 0, movdqa - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+1 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm1 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm1, CL+1, 16, movdqa - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+2 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm2 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm2, CL+2, 32, movdqa - - @CatStr(UNPACK_INC_DST_, TOTALCL, _, MaskType) 3 - endm - -UNPACK2_SSE macro CL, TOTALCL, MaskType, ModeType - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm0 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm0, CL, 0, movdqa - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+1 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm1 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm1, CL+1, 16, movdqa - - @CatStr(UNPACK_INC_DST_, TOTALCL, _, MaskType) 2 - endm - -UNPACK1_SSE macro CL, TOTALCL, MaskType, ModeType - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm0 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm0, CL, 0, movdqa - - @CatStr(UNPACK_INC_DST_, TOTALCL, _, MaskType) 1 - endm - - - -UNPACK_S_32SSE_4x macro CL, TOTALCL, MaskType, ModeType, MOVDQA - MOVDQA xmm7, [rdx] - - pshufd xmm0, xmm7, 0 - pshufd xmm1, xmm7, 055h - pshufd xmm2, xmm7, 0aah - pshufd xmm7, xmm7, 0ffh - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 16 - endm - -UNPACK_S_32SSE_4A macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_32SSE_4x CL, TOTALCL, MaskType, ModeType, movdqa - endm -UNPACK_S_32SSE_4 macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_32SSE_4x CL, TOTALCL, MaskType, ModeType, movdqu - endm - -UNPACK_S_32SSE_3x macro CL, TOTALCL, MaskType, ModeType, MOVDQA - MOVDQA xmm2, [rdx] - - pshufd xmm0, xmm2, 0 - pshufd xmm1, xmm2, 055h - pshufd xmm2, xmm2, 0aah - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 12 - endm - -UNPACK_S_32SSE_3A macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_32SSE_3x CL, TOTALCL, MaskType, ModeType, movdqa - endm -UNPACK_S_32SSE_3 macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_32SSE_3x CL, TOTALCL, MaskType, ModeType, movdqu - endm - -UNPACK_S_32SSE_2 macro CL, TOTALCL, MaskType, ModeType - movq xmm1, QWORD PTR [rdx] - - pshufd xmm0, xmm1, 0 - pshufd xmm1, xmm1, 055h - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 8 - endm - -UNPACK_S_32SSE_2A macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_32SSE_2 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_S_32SSE_1 macro CL, TOTALCL, MaskType, ModeType - movd xmm0, dword ptr [rdx] - pshufd xmm0, xmm0, 0 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 4 - endm - -UNPACK_S_32SSE_1A macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_32SSE_1 CL, TOTALCL, MaskType, ModeType - endm - - -UNPACK_S_16SSE_4 macro CL, TOTALCL, MaskType, ModeType - movq xmm7, QWORD PTR [rdx] - punpcklwd xmm7, xmm7 - UNPACK_RIGHTSHIFT xmm7, 16 - - pshufd xmm0, xmm7, 0 - pshufd xmm1, xmm7, 055h - pshufd xmm2, xmm7, 0aah - pshufd xmm7, xmm7, 0ffh - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 8 - endm - -UNPACK_S_16SSE_4A macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_16SSE_4 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_S_16SSE_3 macro CL, TOTALCL, MaskType, ModeType - movq xmm2, QWORD PTR [rdx] - punpcklwd xmm2, xmm2 - UNPACK_RIGHTSHIFT xmm2, 16 - - pshufd xmm0, xmm2, 0 - pshufd xmm1, xmm2, 055h - pshufd xmm2, xmm2, 0aah - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - add rdx, 6 - endm - -UNPACK_S_16SSE_3A macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_16SSE_3 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_S_16SSE_2 macro CL, TOTALCL, MaskType, ModeType - movd xmm1, dword ptr [rdx] - punpcklwd xmm1, xmm1 - UNPACK_RIGHTSHIFT xmm1, 16 - - pshufd xmm0, xmm1, 0 - pshufd xmm1, xmm1, 055h - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 4 - endm - -UNPACK_S_16SSE_2A macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_16SSE_2 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_S_16SSE_1 macro CL, TOTALCL, MaskType, ModeType - movd xmm0, dword ptr [rdx] - punpcklwd xmm0, xmm0 - UNPACK_RIGHTSHIFT xmm0, 16 - pshufd xmm0, xmm0, 0 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 2 - endm - -UNPACK_S_16SSE_1A macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_16SSE_1 CL, TOTALCL, MaskType, ModeType - endm - - -UNPACK_S_8SSE_4 macro CL, TOTALCL, MaskType, ModeType - movd xmm7, dword ptr [rdx] - punpcklbw xmm7, xmm7 - punpcklwd xmm7, xmm7 - UNPACK_RIGHTSHIFT xmm7, 24 - - pshufd xmm0, xmm7, 0 - pshufd xmm1, xmm7, 055h - pshufd xmm2, xmm7, 0aah - pshufd xmm7, xmm7, 0ffh - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 4 - endm - -UNPACK_S_8SSE_4A macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_8SSE_4 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_S_8SSE_3 macro CL, TOTALCL, MaskType, ModeType - movd xmm2, dword ptr [rdx] - punpcklbw xmm2, xmm2 - punpcklwd xmm2, xmm2 - UNPACK_RIGHTSHIFT xmm2, 24 - - pshufd xmm0, xmm2, 0 - pshufd xmm1, xmm2, 055h - pshufd xmm2, xmm2, 0aah - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 3 - endm - -UNPACK_S_8SSE_3A macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_8SSE_3 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_S_8SSE_2 macro CL, TOTALCL, MaskType, ModeType - movd xmm1, dword ptr [rdx] - punpcklbw xmm1, xmm1 - punpcklwd xmm1, xmm1 - UNPACK_RIGHTSHIFT xmm1, 24 - - pshufd xmm0, xmm1, 0 - pshufd xmm1, xmm1, 055h - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 2 - endm - -UNPACK_S_8SSE_2A macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_8SSE_2 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_S_8SSE_1 macro CL, TOTALCL, MaskType, ModeType - movd xmm0, dword ptr [rdx] - punpcklbw xmm0, xmm0 - punpcklwd xmm0, xmm0 - UNPACK_RIGHTSHIFT xmm0, 24 - pshufd xmm0, xmm0, 0 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - inc rdx - endm - -UNPACK_S_8SSE_1A macro CL, TOTALCL, MaskType, ModeType - UNPACK_S_8SSE_1 CL, TOTALCL, MaskType, ModeType - endm - - -UNPACK_V2_32SSE_4A macro CL, TOTALCL, MaskType, ModeType - MOVDQA xmm0, [rdx] - MOVDQA xmm2, [rdx+16] - - pshufd xmm1, xmm0, 0eeh - pshufd xmm7, xmm2, 0eeh - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 32 - endm - -UNPACK_V2_32SSE_4 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - movq xmm1, QWORD PTR [rdx+8] - movq xmm2, QWORD PTR [rdx+16] - movq xmm7, QWORD PTR [rdx+24] - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 32 - endm - -UNPACK_V2_32SSE_3A macro CL, TOTALCL, MaskType, ModeType - MOVDQA xmm0, [rdx] - movq xmm2, QWORD PTR [rdx+16] - pshufd xmm1, xmm0, 0eeh - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 24 - endm - -UNPACK_V2_32SSE_3 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - movq xmm1, QWORD PTR [rdx+8] - movq xmm2, QWORD PTR [rdx+16] - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 24 - endm - -UNPACK_V2_32SSE_2 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - movq xmm1, QWORD PTR [rdx+8] - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 16 - endm - -UNPACK_V2_32SSE_2A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V2_32SSE_2 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V2_32SSE_1 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 8 - endm - -UNPACK_V2_32SSE_1A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V2_32SSE_1 CL, TOTALCL, MaskType, ModeType - endm - - -UNPACK_V2_16SSE_4A macro CL, TOTALCL, MaskType, ModeType - punpcklwd xmm0, [rdx] - punpckhwd xmm2, [rdx] - - UNPACK_RIGHTSHIFT xmm0, 16 - UNPACK_RIGHTSHIFT xmm2, 16 - - punpckhqdq xmm1, xmm0 - punpckhqdq xmm7, xmm2 - - punpcklqdq xmm0, xmm0 - punpcklqdq xmm2, xmm2 - punpckhqdq xmm1, xmm1 - punpckhqdq xmm7, xmm7 - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - add rdx, 16 - endm - -UNPACK_V2_16SSE_4 macro CL, TOTALCL, MaskType, ModeType - movdqu xmm0, [rdx] - - punpckhwd xmm2, xmm0 - punpcklwd xmm0, xmm0 - - UNPACK_RIGHTSHIFT xmm0, 16 - UNPACK_RIGHTSHIFT xmm2, 16 - - - punpckhqdq xmm1, xmm0 - punpckhqdq xmm7, xmm2 - - punpcklqdq xmm0, xmm0 - punpcklqdq xmm2, xmm2 - punpckhqdq xmm1, xmm1 - punpckhqdq xmm7, xmm7 - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 16 - endm - -UNPACK_V2_16SSE_3A macro CL, TOTALCL, MaskType, ModeType - punpcklwd xmm0, [rdx] - punpckhwd xmm2, [rdx] - - UNPACK_RIGHTSHIFT xmm0, 16 - UNPACK_RIGHTSHIFT xmm2, 16 - - - punpckhqdq xmm1, xmm0 - - punpcklqdq xmm0, xmm0 - punpcklqdq xmm2, xmm2 - punpckhqdq xmm1, xmm1 - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 12 - endm - -UNPACK_V2_16SSE_3 macro CL, TOTALCL, MaskType, ModeType - movdqu xmm0, [rdx] - - punpckhwd xmm2, xmm0 - punpcklwd xmm0, xmm0 - - UNPACK_RIGHTSHIFT xmm0, 16 - UNPACK_RIGHTSHIFT xmm2, 16 - - - punpckhqdq xmm1, xmm0 - - punpcklqdq xmm0, xmm0 - punpcklqdq xmm2, xmm2 - punpckhqdq xmm1, xmm1 - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 12 - endm - -UNPACK_V2_16SSE_2A macro CL, TOTALCL, MaskType, ModeType - punpcklwd xmm0, [rdx] - UNPACK_RIGHTSHIFT xmm0, 16 - - - punpckhqdq xmm1, xmm0 - - punpcklqdq xmm0, xmm0 - punpckhqdq xmm1, xmm1 - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 8 - endm - -UNPACK_V2_16SSE_2 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - punpcklwd xmm0, xmm0 - UNPACK_RIGHTSHIFT xmm0, 16 - - - punpckhqdq xmm1, xmm0 - - punpcklqdq xmm0, xmm0 - punpckhqdq xmm1, xmm1 - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 8 - endm - -UNPACK_V2_16SSE_1A macro CL, TOTALCL, MaskType, ModeType - punpcklwd xmm0, [rdx] - UNPACK_RIGHTSHIFT xmm0, 16 - punpcklqdq xmm0, xmm0 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 4 - endm - -UNPACK_V2_16SSE_1 macro CL, TOTALCL, MaskType, ModeType - movd xmm0, dword ptr [rdx] - punpcklwd xmm0, xmm0 - UNPACK_RIGHTSHIFT xmm0, 16 - punpcklqdq xmm0, xmm0 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 4 - endm - - - -UNPACK_V2_8SSE_4 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - - punpcklbw xmm0, xmm0 - punpckhwd xmm2, xmm0 - punpcklwd xmm0, xmm0 - - UNPACK_RIGHTSHIFT xmm0, 24 - UNPACK_RIGHTSHIFT xmm2, 24 - - - punpckhqdq xmm1, xmm0 - punpckhqdq xmm7, xmm2 - - punpcklqdq xmm0, xmm0 - punpcklqdq xmm2, xmm2 - punpckhqdq xmm1, xmm1 - punpckhqdq xmm7, xmm7 - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 8 - endm - -UNPACK_V2_8SSE_4A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V2_8SSE_4 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V2_8SSE_3 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - - punpcklbw xmm0, xmm0 - punpckhwd xmm2, xmm0 - punpcklwd xmm0, xmm0 - - UNPACK_RIGHTSHIFT xmm0, 24 - UNPACK_RIGHTSHIFT xmm2, 24 - - - punpckhqdq xmm1, xmm0 - - punpcklqdq xmm0, xmm0 - punpcklqdq xmm2, xmm2 - punpckhqdq xmm1, xmm1 - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 6 - endm - -UNPACK_V2_8SSE_3A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V2_8SSE_3 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V2_8SSE_2 macro CL, TOTALCL, MaskType, ModeType - movd xmm0, dword ptr [rdx] - punpcklbw xmm0, xmm0 - punpcklwd xmm0, xmm0 - UNPACK_RIGHTSHIFT xmm0, 24 - - - punpckhqdq xmm1, xmm0 - - punpcklqdq xmm0, xmm0 - punpckhqdq xmm1, xmm1 - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 4 - endm - -UNPACK_V2_8SSE_2A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V2_8SSE_2 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V2_8SSE_1 macro CL, TOTALCL, MaskType, ModeType - movd xmm0, dword ptr [rdx] - punpcklbw xmm0, xmm0 - punpcklwd xmm0, xmm0 - UNPACK_RIGHTSHIFT xmm0, 24 - punpcklqdq xmm0, xmm0 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 2 - endm - -UNPACK_V2_8SSE_1A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V2_8SSE_1 CL, TOTALCL, MaskType, ModeType - endm - - -UNPACK_V3_32SSE_4x macro CL, TOTALCL, MaskType, ModeType, MOVDQA - MOVDQA xmm0, [rdx] - movdqu xmm1, [rdx+12] - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+0 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm0 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm0, CL, 0, movdqa - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+1 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm1 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm1, CL+1, 16, movdqa - - - MOVDQA xmm7, [rdx+32] - movdqu xmm2, [rdx+24] - psrldq xmm7, 4 - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+2 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm2 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm2, CL+2, 32, movdqa - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+3 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm7 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm7, CL+3, 48, movdqa - - @CatStr(UNPACK_INC_DST_, TOTALCL, _, MaskType) 4 - - add rdx, 48 - endm - -UNPACK_V3_32SSE_4A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_32SSE_4x CL, TOTALCL, MaskType, ModeType, movdqa - endm -UNPACK_V3_32SSE_4 macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_32SSE_4x CL, TOTALCL, MaskType, ModeType, movdqu - endm - -UNPACK_V3_32SSE_3x macro CL, TOTALCL, MaskType, ModeType, MOVDQA - MOVDQA xmm0, [rdx] - movdqu xmm1, [rdx+12] - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm0 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm0, CL, 0, movdqa - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+1 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm1 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm1, CL+1, 16, movdqa - - movdqu xmm2, [rdx+24] - - @CatStr(UNPACK_Setup_, MaskType, _SSE_, ModeType, _, TOTALCL) CL+2 - @CatStr(UNPACK_, MaskType, _SSE_, ModeType) xmm2 - @CatStr(UNPACK_Write, TOTALCL, _, MaskType) xmm2, CL+2, 32, movdqa - - @CatStr(UNPACK_INC_DST_, TOTALCL, _, MaskType) 3 - - add rdx, 36 - endm - -UNPACK_V3_32SSE_3A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_32SSE_3x CL, TOTALCL, MaskType, ModeType, movdqa - endm -UNPACK_V3_32SSE_3 macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_32SSE_3x CL, TOTALCL, MaskType, ModeType, movdqu - endm - -UNPACK_V3_32SSE_2x macro CL, TOTALCL, MaskType, ModeType, MOVDQA - MOVDQA xmm0, [rdx] - movdqu xmm1, [rdx+12] - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 24 - endm - -UNPACK_V3_32SSE_2A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_32SSE_2x CL, TOTALCL, MaskType, ModeType, movdqa - endm -UNPACK_V3_32SSE_2 macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_32SSE_2x CL, TOTALCL, MaskType, ModeType, movdqu - endm - -UNPACK_V3_32SSE_1x macro CL, TOTALCL, MaskType, ModeType, MOVDQA - MOVDQA xmm0, [rdx] - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 12 - endm - -UNPACK_V3_32SSE_1A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_32SSE_1x CL, TOTALCL, MaskType, ModeType, movdqa - endm -UNPACK_V3_32SSE_1 macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_32SSE_1x CL, TOTALCL, MaskType, ModeType, movdqu - endm - - -UNPACK_V3_16SSE_4 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - movq xmm1, QWORD PTR [rdx+6] - - punpcklwd xmm0, xmm0 - movq xmm2, QWORD PTR [rdx+12] - punpcklwd xmm1, xmm1 - UNPACK_RIGHTSHIFT xmm0, 16 - movq xmm7, QWORD PTR [rdx+18] - UNPACK_RIGHTSHIFT xmm1, 16 - punpcklwd xmm2, xmm2 - punpcklwd xmm7, xmm7 - - UNPACK_RIGHTSHIFT xmm2, 16 - UNPACK_RIGHTSHIFT xmm7, 16 - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 24 - endm - -UNPACK_V3_16SSE_4A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_16SSE_4 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V3_16SSE_3 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - movq xmm1, QWORD PTR [rdx+6] - - punpcklwd xmm0, xmm0 - movq xmm2, QWORD PTR [rdx+12] - punpcklwd xmm1, xmm1 - UNPACK_RIGHTSHIFT xmm0, 16 - punpcklwd xmm2, xmm2 - - UNPACK_RIGHTSHIFT xmm1, 16 - UNPACK_RIGHTSHIFT xmm2, 16 - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 18 - endm - -UNPACK_V3_16SSE_3A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_16SSE_3 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V3_16SSE_2 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - movq xmm1, QWORD PTR [rdx+6] - - punpcklwd xmm0, xmm0 - punpcklwd xmm1, xmm1 - - UNPACK_RIGHTSHIFT xmm0, 16 - UNPACK_RIGHTSHIFT xmm1, 16 - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 12 - endm - -UNPACK_V3_16SSE_2A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_16SSE_2 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V3_16SSE_1 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - punpcklwd xmm0, xmm0 - UNPACK_RIGHTSHIFT xmm0, 16 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 6 - endm - -UNPACK_V3_16SSE_1A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_16SSE_1 CL, TOTALCL, MaskType, ModeType - endm - - -UNPACK_V3_8SSE_4 macro CL, TOTALCL, MaskType, ModeType - movq xmm1, QWORD PTR [rdx] - movq xmm7, QWORD PTR [rdx+6] - - punpcklbw xmm1, xmm1 - punpcklbw xmm7, xmm7 - punpcklwd xmm0, xmm1 - psrldq xmm1, 6 - punpcklwd xmm2, xmm7 - psrldq xmm7, 6 - punpcklwd xmm1, xmm1 - UNPACK_RIGHTSHIFT xmm0, 24 - punpcklwd xmm7, xmm7 - - UNPACK_RIGHTSHIFT xmm2, 24 - UNPACK_RIGHTSHIFT xmm1, 24 - UNPACK_RIGHTSHIFT xmm7, 24 - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 12 - endm - -UNPACK_V3_8SSE_4A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_8SSE_4 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V3_8SSE_3 macro CL, TOTALCL, MaskType, ModeType - movd xmm0, dword ptr [rdx] - movd xmm1, dword ptr [rdx+3] - - punpcklbw xmm0, xmm0 - movd xmm2, dword ptr [rdx+6] - punpcklbw xmm1, xmm1 - punpcklwd xmm0, xmm0 - punpcklbw xmm2, xmm2 - - punpcklwd xmm1, xmm1 - punpcklwd xmm2, xmm2 - - UNPACK_RIGHTSHIFT xmm0, 24 - UNPACK_RIGHTSHIFT xmm1, 24 - UNPACK_RIGHTSHIFT xmm2, 24 - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 9 - endm - -UNPACK_V3_8SSE_3A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_8SSE_3 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V3_8SSE_2 macro CL, TOTALCL, MaskType, ModeType - movd xmm0, dword ptr [rdx] - movd xmm1, dword ptr [rdx+3] - - punpcklbw xmm0, xmm0 - punpcklbw xmm1, xmm1 - - punpcklwd xmm0, xmm0 - punpcklwd xmm1, xmm1 - - UNPACK_RIGHTSHIFT xmm0, 24 - UNPACK_RIGHTSHIFT xmm1, 24 - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 6 - endm - -UNPACK_V3_8SSE_2A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_8SSE_2 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V3_8SSE_1 macro CL, TOTALCL, MaskType, ModeType - movd xmm0, dword ptr [rdx] - punpcklbw xmm0, xmm0 - punpcklwd xmm0, xmm0 - UNPACK_RIGHTSHIFT xmm0, 24 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 3 - endm - -UNPACK_V3_8SSE_1A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V3_8SSE_1 CL, TOTALCL, MaskType, ModeType - endm - - -UNPACK_V4_32SSE_4A macro CL, TOTALCL, MaskType, ModeType - movdqa xmm0, [rdx] - movdqa xmm1, [rdx+16] - movdqa xmm2, [rdx+32] - movdqa xmm7, [rdx+48] - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 64 - endm - -UNPACK_V4_32SSE_4 macro CL, TOTALCL, MaskType, ModeType - movdqu xmm0, [rdx] - movdqu xmm1, [rdx+16] - movdqu xmm2, [rdx+32] - movdqu xmm7, [rdx+48] - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 64 - endm - -UNPACK_V4_32SSE_3A macro CL, TOTALCL, MaskType, ModeType - movdqa xmm0, [rdx] - movdqa xmm1, [rdx+16] - movdqa xmm2, [rdx+32] - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 48 - endm - -UNPACK_V4_32SSE_3 macro CL, TOTALCL, MaskType, ModeType - movdqu xmm0, [rdx] - movdqu xmm1, [rdx+16] - movdqu xmm2, [rdx+32] - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 48 - endm - -UNPACK_V4_32SSE_2A macro CL, TOTALCL, MaskType, ModeType - movdqa xmm0, [rdx] - movdqa xmm1, [rdx+16] - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 32 - endm - -UNPACK_V4_32SSE_2 macro CL, TOTALCL, MaskType, ModeType - movdqu xmm0, [rdx] - movdqu xmm1, [rdx+16] - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 32 - endm - -UNPACK_V4_32SSE_1A macro CL, TOTALCL, MaskType, ModeType - movdqa xmm0, [rdx] - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 16 - endm - -UNPACK_V4_32SSE_1 macro CL, TOTALCL, MaskType, ModeType - movdqu xmm0, [rdx] - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 16 - endm - - -UNPACK_V4_16SSE_4A macro CL, TOTALCL, MaskType, ModeType - - punpcklwd xmm0, [rdx] - punpckhwd xmm1, [rdx] - punpcklwd xmm2, [rdx+16] - punpckhwd xmm7, [rdx+16] - - UNPACK_RIGHTSHIFT xmm1, 16 - UNPACK_RIGHTSHIFT xmm7, 16 - UNPACK_RIGHTSHIFT xmm0, 16 - UNPACK_RIGHTSHIFT xmm2, 16 - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 32 - endm - -UNPACK_V4_16SSE_4 macro CL, TOTALCL, MaskType, ModeType - movdqu xmm0, [rdx] - movdqu xmm2, [rdx+16] - - punpckhwd xmm1, xmm0 - punpckhwd xmm7, xmm2 - punpcklwd xmm0, xmm0 - punpcklwd xmm2, xmm2 - - UNPACK_RIGHTSHIFT xmm1, 16 - UNPACK_RIGHTSHIFT xmm7, 16 - UNPACK_RIGHTSHIFT xmm0, 16 - UNPACK_RIGHTSHIFT xmm2, 16 - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 32 - endm - -UNPACK_V4_16SSE_3A macro CL, TOTALCL, MaskType, ModeType - punpcklwd xmm0, [rdx] - punpckhwd xmm1, [rdx] - punpcklwd xmm2, [rdx+16] - - UNPACK_RIGHTSHIFT xmm0, 16 - UNPACK_RIGHTSHIFT xmm1, 16 - UNPACK_RIGHTSHIFT xmm2, 16 - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 24 - endm - -UNPACK_V4_16SSE_3 macro CL, TOTALCL, MaskType, ModeType - movdqu xmm0, [rdx] - movq xmm2, QWORD PTR [rdx+16] - - punpckhwd xmm1, xmm0 - punpcklwd xmm0, xmm0 - punpcklwd xmm2, xmm2 - - UNPACK_RIGHTSHIFT xmm0, 16 - UNPACK_RIGHTSHIFT xmm1, 16 - UNPACK_RIGHTSHIFT xmm2, 16 - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 24 - endm - -UNPACK_V4_16SSE_2A macro CL, TOTALCL, MaskType, ModeType - punpcklwd xmm0, [rdx] - punpckhwd xmm1, [rdx] - - UNPACK_RIGHTSHIFT xmm0, 16 - UNPACK_RIGHTSHIFT xmm1, 16 - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 16 - endm - -UNPACK_V4_16SSE_2 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - movq xmm1, QWORD PTR [rdx+8] - - punpcklwd xmm0, xmm0 - punpcklwd xmm1, xmm1 - - UNPACK_RIGHTSHIFT xmm0, 16 - UNPACK_RIGHTSHIFT xmm1, 16 - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 16 - endm - -UNPACK_V4_16SSE_1A macro CL, TOTALCL, MaskType, ModeType - punpcklwd xmm0, [rdx] - UNPACK_RIGHTSHIFT xmm0, 16 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 8 - endm - -UNPACK_V4_16SSE_1 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - punpcklwd xmm0, xmm0 - UNPACK_RIGHTSHIFT xmm0, 16 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 8 - endm - - -UNPACK_V4_8SSE_4A macro CL, TOTALCL, MaskType, ModeType - punpcklbw xmm0, [rdx] - punpckhbw xmm2, [rdx] - - punpckhwd xmm1, xmm0 - punpckhwd xmm7, xmm2 - punpcklwd xmm0, xmm0 - punpcklwd xmm2, xmm2 - - UNPACK_RIGHTSHIFT xmm1, 24 - UNPACK_RIGHTSHIFT xmm7, 24 - UNPACK_RIGHTSHIFT xmm0, 24 - UNPACK_RIGHTSHIFT xmm2, 24 - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 16 - endm - -UNPACK_V4_8SSE_4 macro CL, TOTALCL, MaskType, ModeType - movdqu xmm0, [rdx] - - punpckhbw xmm2, xmm0 - punpcklbw xmm0, xmm0 - - punpckhwd xmm7, xmm2 - punpckhwd xmm1, xmm0 - punpcklwd xmm2, xmm2 - punpcklwd xmm0, xmm0 - - UNPACK_RIGHTSHIFT xmm7, 24 - UNPACK_RIGHTSHIFT xmm2, 24 - - UNPACK_RIGHTSHIFT xmm0, 24 - UNPACK_RIGHTSHIFT xmm1, 24 - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 16 - endm - -UNPACK_V4_8SSE_3A macro CL, TOTALCL, MaskType, ModeType - punpcklbw xmm0, [rdx] - punpckhbw xmm2, [rdx] - - punpckhwd xmm1, xmm0 - punpcklwd xmm0, xmm0 - punpcklwd xmm2, xmm2 - - UNPACK_RIGHTSHIFT xmm1, 24 - UNPACK_RIGHTSHIFT xmm0, 24 - UNPACK_RIGHTSHIFT xmm2, 24 - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 12 - endm - -UNPACK_V4_8SSE_3 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - movd xmm2, dword ptr [rdx+8] - - punpcklbw xmm0, xmm0 - punpcklbw xmm2, xmm2 - - punpckhwd xmm1, xmm0 - punpcklwd xmm2, xmm2 - punpcklwd xmm0, xmm0 - - UNPACK_RIGHTSHIFT xmm1, 24 - UNPACK_RIGHTSHIFT xmm0, 24 - UNPACK_RIGHTSHIFT xmm2, 24 - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 12 - endm - -UNPACK_V4_8SSE_2A macro CL, TOTALCL, MaskType, ModeType - punpcklbw xmm0, [rdx] - - punpckhwd xmm1, xmm0 - punpcklwd xmm0, xmm0 - - UNPACK_RIGHTSHIFT xmm1, 24 - UNPACK_RIGHTSHIFT xmm0, 24 - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 8 - endm - -UNPACK_V4_8SSE_2 macro CL, TOTALCL, MaskType, ModeType - movq xmm0, QWORD PTR [rdx] - - punpcklbw xmm0, xmm0 - - punpckhwd xmm1, xmm0 - punpcklwd xmm0, xmm0 - - UNPACK_RIGHTSHIFT xmm1, 24 - UNPACK_RIGHTSHIFT xmm0, 24 - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 8 - endm - -UNPACK_V4_8SSE_1A macro CL, TOTALCL, MaskType, ModeType - punpcklbw xmm0, [rdx] - punpcklwd xmm0, xmm0 - UNPACK_RIGHTSHIFT xmm0, 24 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 4 - endm - -UNPACK_V4_8SSE_1 macro CL, TOTALCL, MaskType, ModeType - movd xmm0, dword ptr [rdx] - punpcklbw xmm0, xmm0 - punpcklwd xmm0, xmm0 - UNPACK_RIGHTSHIFT xmm0, 24 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 4 - endm - - -DECOMPRESS_RGBA macro OFFSET - mov bl, al - shl bl, 3 - mov byte ptr [s_TempDecompress+OFFSET], bl - - mov bx, ax - shr bx, 2 - and bx, 0f8h - mov byte ptr [s_TempDecompress+OFFSET+1], bl - - mov bx, ax - shr bx, 7 - and bx, 0f8h - mov byte ptr [s_TempDecompress+OFFSET+2], bl - mov bx, ax - shr bx, 8 - and bx, 080h - mov byte ptr [s_TempDecompress+OFFSET+3], bl - endm - -UNPACK_V4_5SSE_4 macro CL, TOTALCL, MaskType, ModeType - mov eax, dword ptr [rdx] - DECOMPRESS_RGBA 0 - - shr eax, 16 - DECOMPRESS_RGBA 4 - - mov eax, dword ptr [rdx+4] - DECOMPRESS_RGBA 8 - - shr eax, 16 - DECOMPRESS_RGBA 12 - - - movdqa xmm0, XMMWORD PTR [s_TempDecompress] - - punpckhbw xmm2, xmm0 - punpcklbw xmm0, xmm0 - - punpckhwd xmm7, xmm2 - punpckhwd xmm1, xmm0 - punpcklwd xmm0, xmm0 - punpcklwd xmm2, xmm2 - - psrld xmm0, 24 - psrld xmm1, 24 - psrld xmm2, 24 - psrld xmm7, 24 - - UNPACK4_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 8 - endm - -UNPACK_V4_5SSE_4A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V4_5SSE_4 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V4_5SSE_3 macro CL, TOTALCL, MaskType, ModeType - mov eax, dword ptr [rdx] - DECOMPRESS_RGBA 0 - - shr eax, 16 - DECOMPRESS_RGBA 4 - - mov eax, dword ptr [rdx] - DECOMPRESS_RGBA 8 - - - movdqa xmm0, XMMWORD PTR [s_TempDecompress] - - punpckhbw xmm2, xmm0 - punpcklbw xmm0, xmm0 - - punpckhwd xmm1, xmm0 - punpcklwd xmm0, xmm0 - punpcklwd xmm2, xmm2 - - psrld xmm0, 24 - psrld xmm1, 24 - psrld xmm2, 24 - - UNPACK3_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 6 - endm - -UNPACK_V4_5SSE_3A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V4_5SSE_3 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V4_5SSE_2 macro CL, TOTALCL, MaskType, ModeType - mov eax, dword ptr [rdx] - DECOMPRESS_RGBA 0 - - shr eax, 16 - DECOMPRESS_RGBA 4 - - movq xmm0, QWORD PTR [s_TempDecompress] - - punpcklbw xmm0, xmm0 - - punpckhwd xmm1, xmm0 - punpcklwd xmm0, xmm0 - - psrld xmm0, 24 - psrld xmm1, 24 - - UNPACK2_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 4 - endm - -UNPACK_V4_5SSE_2A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V4_5SSE_2 CL, TOTALCL, MaskType, ModeType - endm - -UNPACK_V4_5SSE_1 macro CL, TOTALCL, MaskType, ModeType - mov ax, word ptr [rdx] - DECOMPRESS_RGBA 0 - - movd xmm0, DWORD PTR [s_TempDecompress] - punpcklbw xmm0, xmm0 - punpcklwd xmm0, xmm0 - - psrld xmm0, 24 - - UNPACK1_SSE CL, TOTALCL, MaskType, ModeType - - add rdx, 2 - endm - -UNPACK_V4_5SSE_1A macro CL, TOTALCL, MaskType, ModeType - UNPACK_V4_5SSE_1 CL, TOTALCL, MaskType, ModeType - endm - - -SAVE_ROW_REG_BASE macro - mov rax, [_vifRow] - movdqa [rax], xmm6 - mov rax, [_vifRegs] - movss dword ptr [rax+0100h], xmm6 - psrldq xmm6, 4 - movss dword ptr [rax+0110h], xmm6 - psrldq xmm6, 4 - movss dword ptr [rax+0120h], xmm6 - psrldq xmm6, 4 - movss dword ptr [rax+0130h], xmm6 - endm - -SAVE_NO_REG macro - endm - - - -INIT_ARGS macro - mov rax, qword ptr [_vifRow] - mov r9, qword ptr [_vifCol] - movaps xmm6, XMMWORD PTR [rax] - movaps xmm7, XMMWORD PTR [r9] - endm - -INC_STACK macro reg - add rsp, 8 - endm - - - -defUNPACK_SkippingWrite macro name, MaskType, ModeType, qsize, sign, SAVE_ROW_REG -@CatStr(UNPACK_SkippingWrite_, name, _, sign, _, MaskType, _, ModeType) proc public - - push rdi - INIT_ARGS - mov rax, [_vifRegs] - movzx rdi, byte ptr [rax + 040h] - movzx r9, byte ptr [rax + 041h] - sub rdi, r9 - shl rdi, 4 - - cmp r9d, 1 - je @CatStr(name, _, sign, _, MaskType, _, ModeType, _WL1) - cmp r9d, 2 - je @CatStr(name, _, sign, _, MaskType, _, ModeType, _WL2) - cmp r9d, 3 - je @CatStr(name, _, sign, _, MaskType, _, ModeType, _WL3) - jmp @CatStr(name, _, sign, _, MaskType, _, ModeType, _WL4) - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _WL1): - @CatStr(UNPACK_Start_Setup_, MaskType, _SSE_, ModeType) 0 - - cmp r8d, qsize - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Done3) - - add rdi, 16 - - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Align16): - - test rdx, 15 - jz @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_UnpackAligned) - - @CatStr(UNPACK_, name, SSE_1) 0, 1, MaskType, ModeType - - cmp r8d, (2*qsize) - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_DoneWithDec) - sub r8d, qsize - jmp @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Align16) - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_UnpackAligned): - - cmp r8d, (2*qsize) - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Unpack1) - cmp r8d, (3*qsize) - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Unpack2) - cmp r8d, (4*qsize) - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Unpack3) - prefetchnta [rdx + 64] - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Unpack4): - @CatStr(UNPACK_, name, SSE_4A) 0, 1, MaskType, ModeType - - cmp r8d, (8*qsize) - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_DoneUnpack4) - sub r8d, (4*qsize) - jmp @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Unpack4) - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_DoneUnpack4): - - sub r8d, (4*qsize) - cmp r8d, qsize - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Done3) - cmp r8d, (2*qsize) - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Unpack1) - cmp r8d, (3*qsize) - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Unpack2) - - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Unpack3): - @CatStr(UNPACK_, name, SSE_3A) 0, 1, MaskType, ModeType - - sub r8d, (3*qsize) - jmp @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Done3) - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Unpack2): - @CatStr(UNPACK_, name, SSE_2A) 0, 1, MaskType, ModeType - - sub r8d, (2*qsize) - jmp @CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Done3) - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Unpack1): - @CatStr(UNPACK_, name, SSE_1A) 0, 1, MaskType, ModeType -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_DoneWithDec): - sub r8d, qsize -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C1_Done3): - SAVE_ROW_REG - mov eax, r8d - - pop rdi - ret - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _WL2): - cmp r8d, (2*qsize) - - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C2_Done3) -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C2_Unpack): - @CatStr(UNPACK_, name, SSE_2) 0, 0, MaskType, ModeType - - - add rcx, rdi - cmp r8d, (4*qsize) - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C2_Done2) - sub r8d, (2*qsize) - - jmp @CatStr(name, _, sign, _, MaskType, _, ModeType, _C2_Unpack) - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C2_Done2): - sub r8d, (2*qsize) -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C2_Done3): - cmp r8d, qsize - - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C2_Done4) - - - @CatStr(UNPACK_, name, SSE_1) 0, 0, MaskType, ModeType - - sub r8d, qsize -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C2_Done4): - - SAVE_ROW_REG - mov eax, r8d - - pop rdi - ret - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _WL3): - cmp r8d, (3*qsize) - - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C3_Done5) -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C3_Unpack): - @CatStr(UNPACK_, name, SSE_3) 0, 0, MaskType, ModeType - - add rcx, rdi - cmp r8d, (6*qsize) - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C3_Done2) - sub r8d, (3*qsize) - jmp @CatStr(name, _, sign, _, MaskType, _, ModeType, _C3_Unpack) -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C3_Done2): - sub r8d, (3*qsize) -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C3_Done5): - cmp r8d, qsize - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C3_Done4) - - cmp r8d, (2*qsize) - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C3_Done3) - - @CatStr(UNPACK_, name, SSE_2) 0, 0, MaskType, ModeType - - sub r8d, (2*qsize) - jmp @CatStr(name, _, sign, _, MaskType, _, ModeType, _C3_Done4) -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C3_Done3): - sub r8d, qsize - @CatStr(UNPACK_, name, SSE_1) 0, 0, MaskType, ModeType -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C3_Done4): - SAVE_ROW_REG - mov eax, r8d - - pop rdi - - ret - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _WL4): - sub r9, 3 - push rdi - cmp r8d, qsize - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_Done) - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_Unpack): - cmp r8d, (3*qsize) - jge @CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_Unpack3) - cmp r8d, (2*qsize) - jge @CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_Unpack2) - - @CatStr(UNPACK_, name, SSE_1) 0, 0, MaskType, ModeType - - - sub r8d, qsize - jmp @CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_Done) -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_Unpack2): - @CatStr(UNPACK_, name, SSE_2) 0, 0, MaskType, ModeType - - - sub r8d, (2*qsize) - jmp @CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_Done) -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_Unpack3): - @CatStr(UNPACK_, name, SSE_3) 0, 0, MaskType, ModeType - - - sub r8d, (3*qsize) - mov rdi, r9 - -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_UnpackX): - - - cmp r8d, qsize - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_Done) - - @CatStr(UNPACK_, name, SSE_1) 3, 0, MaskType, ModeType - - sub r8d, qsize - cmp rdi, 1 - je @CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_DoneLoop) - sub rdi, 1 - jmp @CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_UnpackX) -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_DoneLoop): - add rcx, [rsp] - cmp r8d, qsize - jl @CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_Done) - jmp @CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_Unpack) -@CatStr(name, _, sign, _, MaskType, _, ModeType, _C4_Done): - - SAVE_ROW_REG - INC_STACK() - mov eax, r8d - - - pop rdi - ret -@CatStr(UNPACK_SkippingWrite_, name, _, sign, _, MaskType, _, ModeType endp) -endm - -UNPACK_RIGHTSHIFT macro reg, shift - psrld reg, shift - endm - -defUNPACK_SkippingWrite2 macro name, qsize - defUNPACK_SkippingWrite name, Regular, 0, qsize, u, SAVE_NO_REG - defUNPACK_SkippingWrite name, Regular, 1, qsize, u, SAVE_NO_REG - defUNPACK_SkippingWrite name, Regular, 2, qsize, u, SAVE_ROW_REG_BASE - defUNPACK_SkippingWrite name, Mask, 0, qsize, u, SAVE_NO_REG - defUNPACK_SkippingWrite name, Mask, 1, qsize, u, SAVE_NO_REG - defUNPACK_SkippingWrite name, Mask, 2, qsize, u, SAVE_ROW_REG_BASE - defUNPACK_SkippingWrite name, WriteMask, 0, qsize, u, SAVE_NO_REG - defUNPACK_SkippingWrite name, WriteMask, 1, qsize, u, SAVE_NO_REG - defUNPACK_SkippingWrite name, WriteMask, 2, qsize, u, SAVE_ROW_REG_BASE - endm - -defUNPACK_SkippingWrite2 S_32, 4 -defUNPACK_SkippingWrite2 S_16, 2 -defUNPACK_SkippingWrite2 S_8, 1 -defUNPACK_SkippingWrite2 V2_32, 8 -defUNPACK_SkippingWrite2 V2_16, 4 -defUNPACK_SkippingWrite2 V2_8, 2 -defUNPACK_SkippingWrite2 V3_32, 12 -defUNPACK_SkippingWrite2 V3_16, 6 -defUNPACK_SkippingWrite2 V3_8, 3 -defUNPACK_SkippingWrite2 V4_32, 16 -defUNPACK_SkippingWrite2 V4_16, 8 -defUNPACK_SkippingWrite2 V4_8, 4 -defUNPACK_SkippingWrite2 V4_5, 2 - -UNPACK_RIGHTSHIFT macro reg, shift - psrad reg, shift - endm - - -defUNPACK_SkippingWrite2a macro name, qsize - defUNPACK_SkippingWrite name, Mask, 0, qsize, s, SAVE_NO_REG - defUNPACK_SkippingWrite name, Regular, 0, qsize, s, SAVE_NO_REG - defUNPACK_SkippingWrite name, Regular, 1, qsize, s, SAVE_NO_REG - defUNPACK_SkippingWrite name, Regular, 2, qsize, s, SAVE_ROW_REG_BASE - defUNPACK_SkippingWrite name, Mask, 1, qsize, s, SAVE_NO_REG - defUNPACK_SkippingWrite name, Mask, 2, qsize, s, SAVE_ROW_REG_BASE - defUNPACK_SkippingWrite name, WriteMask, 0, qsize, s, SAVE_NO_REG - defUNPACK_SkippingWrite name, WriteMask, 1, qsize, s, SAVE_NO_REG - defUNPACK_SkippingWrite name, WriteMask, 2, qsize, s, SAVE_ROW_REG_BASE - endm - -defUNPACK_SkippingWrite2a S_16, 2 -defUNPACK_SkippingWrite2a S_8, 1 -defUNPACK_SkippingWrite2a V2_16, 4 -defUNPACK_SkippingWrite2a V2_8, 2 -defUNPACK_SkippingWrite2a V3_16, 6 -defUNPACK_SkippingWrite2a V3_8, 3 -defUNPACK_SkippingWrite2a V4_16, 8 -defUNPACK_SkippingWrite2a V4_8, 4 - -end diff --git a/pcsx2v2/x86/ix86-64/fast_routines-64.asm b/pcsx2v2/x86/ix86-64/fast_routines-64.asm deleted file mode 100644 index 77e2744..0000000 --- a/pcsx2v2/x86/ix86-64/fast_routines-64.asm +++ /dev/null @@ -1,294 +0,0 @@ -; Pcsx2 - Pc Ps2 Emulator -; Copyright (C) 2002-2008 Pcsx2 Team -; -; This program is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation; either version 2 of the License, or -; (at your option) any later version. - -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program; if not, write to the Free Software -; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - -;; Fast assembly routines for x86-64 masm compiler -;; zerofrog(@gmail.com) -.code - -;; mmx memcmp implementation, size has to be a multiple of 8 -;; returns 0 is equal, nonzero value if not equal -;; ~10 times faster than standard memcmp -;; (zerofrog) -;; u8 memcmp_mmx(const void* src1, const void* src2, int cmpsize) -memcmp_mmx proc public - - cmp r8d, 32 - jl memcmp_Done4 - - ;; custom test first 8 to make sure things are ok - movq mm0, [rdx] - movq mm1, [rdx+8] - pcmpeqd mm0, [rcx] - pcmpeqd mm1, [rcx+8] - pand mm0, mm1 - movq mm2, [rdx+16] - pmovmskb eax, mm0 - movq mm3, [rdx+24] - - ;; check if eq - cmp eax, 0ffh - je memcmp_NextComp - mov eax, 1 - jmp memcmp_End - -memcmp_NextComp: - pcmpeqd mm2, [rcx+16] - pcmpeqd mm3, [rcx+24] - pand mm2, mm3 - pmovmskb eax, mm2 - - sub r8d, 32 - add rdx, 32 - add rcx, 32 - - ;; check if eq - cmp eax, 0ffh - je memcmp_ContinueTest - mov eax, 1 - jmp memcmp_End - - cmp r8d, 64 - jl memcmp_Done8 - -memcmp_Cmp8: - movq mm0, [rdx] - movq mm1, [rdx+8] - movq mm2, [rdx+16] - movq mm3, [rdx+24] - movq mm4, [rdx+32] - movq mm5, [rdx+40] - movq mm6, [rdx+48] - movq mm7, [rdx+56] - pcmpeqd mm0, [rcx] - pcmpeqd mm1, [rcx+8] - pcmpeqd mm2, [rcx+16] - pcmpeqd mm3, [rcx+24] - pand mm0, mm1 - pcmpeqd mm4, [rcx+32] - pand mm0, mm2 - pcmpeqd mm5, [rcx+40] - pand mm0, mm3 - pcmpeqd mm6, [rcx+48] - pand mm0, mm4 - pcmpeqd mm7, [rcx+56] - pand mm0, mm5 - pand mm0, mm6 - pand mm0, mm7 - pmovmskb eax, mm0 - - ;; check if eq - cmp eax, 0ffh - je memcmp_Continue - mov eax, 1 - jmp memcmp_End - -memcmp_Continue: - sub r8d, 64 - add rdx, 64 - add rcx, 64 -memcmp_ContinueTest: - cmp r8d, 64 - jge memcmp_Cmp8 - -memcmp_Done8: - test r8d, 020h - jz memcmp_Done4 - movq mm0, [rdx] - movq mm1, [rdx+8] - movq mm2, [rdx+16] - movq mm3, [rdx+24] - pcmpeqd mm0, [rcx] - pcmpeqd mm1, [rcx+8] - pcmpeqd mm2, [rcx+16] - pcmpeqd mm3, [rcx+24] - pand mm0, mm1 - pand mm0, mm2 - pand mm0, mm3 - pmovmskb eax, mm0 - sub r8d, 32 - add rdx, 32 - add rcx, 32 - - ;; check if eq - cmp eax, 0ffh - je memcmp_Done4 - mov eax, 1 - jmp memcmp_End - -memcmp_Done4: - cmp r8d, 24 - jne memcmp_Done2 - movq mm0, [rdx] - movq mm1, [rdx+8] - movq mm2, [rdx+16] - pcmpeqd mm0, [rcx] - pcmpeqd mm1, [rcx+8] - pcmpeqd mm2, [rcx+16] - pand mm0, mm1 - pand mm0, mm2 - pmovmskb eax, mm0 - - ;; check if eq - cmp eax, 0ffh - je memcmp_Done - mov eax, 1 - jmp memcmp_End - -memcmp_Done2: - cmp r8d, 16 - jne memcmp_Done1 - - movq mm0, [rdx] - movq mm1, [rdx+8] - pcmpeqd mm0, [rcx] - pcmpeqd mm1, [rcx+8] - pand mm0, mm1 - pmovmskb eax, mm0 - - ;; check if eq - cmp eax, 0ffh - je memcmp_Done - mov eax, 1 - jmp memcmp_End - -memcmp_Done1: - cmp r8d, 8 - jne memcmp_Done - - mov eax, [rdx] - mov rdx, [rdx+4] - cmp eax, [rcx] - je memcmp_Next - mov eax, 1 - jmp memcmp_End - -memcmp_Next: - cmp rdx, [rcx+4] - je memcmp_Done - mov eax, 1 - jmp memcmp_End - -memcmp_Done: - xor eax, eax - -memcmp_End: - emms - ret -memcmp_mmx endp - -;; memxor_mmx -memxor_mmx proc public - - cmp r8d, 64 - jl memxor_Setup4 - - movq mm0, [rdx] - movq mm1, [rdx+8] - movq mm2, [rdx+16] - movq mm3, [rdx+24] - movq mm4, [rdx+32] - movq mm5, [rdx+40] - movq mm6, [rdx+48] - movq mm7, [rdx+56] - sub r8d, 64 - add rdx, 64 - cmp r8d, 64 - jl memxor_End8 - -memxor_Cmp8: - pxor mm0, [rdx] - pxor mm1, [rdx+8] - pxor mm2, [rdx+16] - pxor mm3, [rdx+24] - pxor mm4, [rdx+32] - pxor mm5, [rdx+40] - pxor mm6, [rdx+48] - pxor mm7, [rdx+56] - - sub r8d, 64 - add rdx, 64 - cmp r8d, 64 - jge memxor_Cmp8 - -memxor_End8: - pxor mm0, mm4 - pxor mm1, mm5 - pxor mm2, mm6 - pxor mm3, mm7 - - cmp r8d, 32 - jl memxor_End4 - pxor mm0, [rdx] - pxor mm1, [rdx+8] - pxor mm2, [rdx+16] - pxor mm3, [rdx+24] - sub r8d, 32 - add rdx, 32 - jmp memxor_End4 - -memxor_Setup4: - cmp r8d, 32 - jl memxor_Setup2 - - movq mm0, [rdx] - movq mm1, [rdx+8] - movq mm2, [rdx+16] - movq mm3, [rdx+24] - sub r8d, 32 - add rdx, 32 - -memxor_End4: - pxor mm0, mm2 - pxor mm1, mm3 - - cmp r8d, 16 - jl memxor_End2 - pxor mm0, [rdx] - pxor mm1, [rdx+8] - sub r8d, 16 - add rdx, 16 - jmp memxor_End2 - -memxor_Setup2: - cmp r8d, 16 - jl memxor_Setup1 - - movq mm0, [rdx] - movq mm1, [rdx+8] - sub r8d, 16 - add rdx, 16 - -memxor_End2: - pxor mm0, mm1 - - cmp r8d, 8 - jl memxor_End1 - pxor mm0, [rdx] -memxor_End1: - movq [rcx], mm0 - jmp memxor_End - -memxor_Setup1: - movq mm0, [rdx] - movq [rcx], mm0 -memxor_End: - emms - ret - -memxor_mmx endp - -end \ No newline at end of file diff --git a/pcsx2v2/x86/ix86-64/iCore-64.cpp b/pcsx2v2/x86/ix86-64/iCore-64.cpp deleted file mode 100644 index 3446f9b..0000000 --- a/pcsx2v2/x86/ix86-64/iCore-64.cpp +++ /dev/null @@ -1,720 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ -// stop compiling if NORECBUILD build (only for Visual Studio) -#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) - -#include -#include -#include -#include - -extern "C" { - -#if defined(_WIN32) -#include -#endif - -#include "PS2Etypes.h" -#include "System.h" -#include "R5900.h" -#include "Vif.h" -#include "VU.h" -#include "ix86/ix86.h" -#include "iCore.h" -#include "R3000A.h" - -u16 x86FpuState, iCWstate; -u16 g_mmxAllocCounter = 0; - -// X86 caching -extern _x86regs x86regs[X86REGS]; -extern u16 g_x86AllocCounter; - -} // end extern "C" - -u32 g_recFnArgs[4]; - -#include -using namespace std; - -// use special x86 register allocation for ia32 -void _initX86regs() { - memset(x86regs, 0, sizeof(x86regs)); - g_x86AllocCounter = 0; -} - -uptr _x86GetAddr(int type, int reg) -{ - switch(type&~X86TYPE_VU1) { - case X86TYPE_GPR: return (uptr)&cpuRegs.GPR.r[reg]; - case X86TYPE_VI: { - //assert( reg < 16 || reg == REG_R ); - return (type&X86TYPE_VU1)?(uptr)&VU1.VI[reg]:(uptr)&VU0.VI[reg]; - } - case X86TYPE_MEMOFFSET: return 0; - case X86TYPE_VIMEMOFFSET: return 0; - case X86TYPE_VUQREAD: return (type&X86TYPE_VU1)?(uptr)&VU1.VI[REG_Q]:(uptr)&VU0.VI[REG_Q]; - case X86TYPE_VUPREAD: return (type&X86TYPE_VU1)?(uptr)&VU1.VI[REG_P]:(uptr)&VU0.VI[REG_P]; - case X86TYPE_VUQWRITE: return (type&X86TYPE_VU1)?(uptr)&VU1.q:(uptr)&VU0.q; - case X86TYPE_VUPWRITE: return (type&X86TYPE_VU1)?(uptr)&VU1.p:(uptr)&VU0.p; - case X86TYPE_PSX: return (uptr)&psxRegs.GPR.r[reg]; - case X86TYPE_PCWRITEBACK: - return (uptr)&g_recWriteback; - case X86TYPE_VUJUMP: - return (uptr)&g_recWriteback; - case X86TYPE_FNARG: - return (uptr)&g_recFnArgs[reg]; - default: assert(0); - } - - return 0; -} - -int _getFreeX86reg(int mode) -{ - int i, tempi; - u32 bestcount = 0x10000; - x86IntRegType* pregs = (mode&MODE_8BITREG)?g_x868bitregs:g_x86allregs; - int maxreg = (mode&MODE_8BITREG)?ARRAYSIZE(g_x868bitregs):ARRAYSIZE(g_x86allregs); - - if( !(mode&MODE_8BITREG) && (mode&0x80000000) ) { - // prioritize the temp registers - for (i=0; i= 0 && reg < 32 ); - -// if( X86_ISVI(type) ) -// assert( reg < 16 || reg == REG_R ); - - // don't alloc EAX and ESP,EBP if MODE_NOFRAME - int oldmode = mode; - int noframe = mode&MODE_NOFRAME; - int mode8bit = mode&MODE_8BITREG; - x86IntRegType* pregs = (mode&MODE_8BITREG)?g_x868bitregs:g_x86allregs; - int maxreg = (mode&MODE_8BITREG)?ARRAYSIZE(g_x868bitregs):ARRAYSIZE(g_x86allregs); - mode &= ~(MODE_NOFRAME|MODE_8BITREG); - int readfromreg = -1; - - - if( type != X86TYPE_TEMP ) { - - if( mode8bit ) { - // make sure reg isn't in the non8bit regs - - for(j = 0; j < ARRAYSIZE(g_x86non8bitregs); ++j) { - int i = g_x86non8bitregs[j]; - if (!x86regs[i].inuse || x86regs[i].type != type || x86regs[i].reg != reg) - continue; - - if( mode & MODE_READ ) { - readfromreg = i; - x86regs[i].inuse = 0; - break; - } - else if( mode & MODE_WRITE ) { - x86regs[i].inuse = 0; - break; - } - } - } - - for (j=0; j= 0 ) { - // requested specific reg, so return that instead - if( i != x86reg ) { - if( x86regs[i].mode & MODE_READ ) readfromreg = i; - //if( x86regs[i].mode & MODE_WRITE ) mode |= MODE_WRITE; - mode |= x86regs[i].mode&MODE_WRITE; - x86regs[i].inuse = 0; - break; - } - } - - if( type != X86TYPE_TEMP && !(x86regs[i].mode & MODE_READ) && (mode&MODE_READ)) { - - if( type == X86TYPE_GPR ) { - - if( reg == 0 ) XOR64RtoR(i, i); - else { - if( GPR_IS_CONST1(reg) ) - MOV64ItoR(i, g_cpuConstRegs[reg].UD[0]); - else - MOV64MtoR(i, _x86GetAddr(type, reg)); - } - } - else if( X86_ISVI(type) && reg < 16 ) MOVZX32M16toR(i, _x86GetAddr(type, reg)); - else // the rest are 32 bit - MOV32MtoR(i, _x86GetAddr(type, reg)); - - x86regs[i].mode |= MODE_READ; - } - - x86regs[i].needed = 1; - x86regs[i].mode|= mode; - return i; - } - } - - // currently only gpr regs are const - if( type == X86TYPE_GPR && (mode & MODE_WRITE) && reg < 32 ) { - //assert( !(g_cpuHasConstReg & (1<= 0 ) MOV64RtoR(x86reg, readfromreg); - else { - if( type == X86TYPE_GPR ) { - - if( reg == 0 ) { - if( mode & MODE_READ ) - XOR64RtoR(x86reg, x86reg); - return x86reg; - } - - int xmmreg; - if( (xmmreg = _checkXMMreg(XMMTYPE_GPRREG, reg, 0)) >= 0 ) { - // destroy the xmm reg, but don't flush - SSE_MOVHPS_XMM_to_M64(_x86GetAddr(type, reg)+8, xmmreg); - - if( mode & MODE_READ ) - SSE2_MOVQ_XMM_to_R(x86reg, xmmreg); - - if( xmmregs[xmmreg].mode & MODE_WRITE ) - x86regs[x86reg].mode |= MODE_WRITE; - - // don't flush - xmmregs[xmmreg].inuse = 0; - } - else { - if( mode & MODE_READ ) { - if( GPR_IS_CONST1(reg) ) - MOV64ItoR(x86reg, g_cpuConstRegs[reg].UD[0]); - else - MOV64MtoR(x86reg, _x86GetAddr(type, reg)); - } - } - } - else if( mode & MODE_READ ) { - if( X86_ISVI(type) && reg < 16 ) { - if( reg == 0 ) XOR32RtoR(x86reg, x86reg); - else MOVZX32M16toR(x86reg, _x86GetAddr(type, reg)); - } - else MOV32MtoR(x86reg, _x86GetAddr(type, reg)); - } - } - - return x86reg; -} - -int _checkX86reg(int type, int reg, int mode) -{ - int i; - - for (i=0; i= 0 && x86reg < X86REGS ); - - if( x86regs[x86reg].inuse && (x86regs[x86reg].mode&MODE_WRITE) ) { - - if( x86regs[x86reg].type == X86TYPE_GPR ) - MOV64RtoM(_x86GetAddr(x86regs[x86reg].type, x86regs[x86reg].reg), x86reg); - if( X86_ISVI(x86regs[x86reg].type) && x86regs[x86reg].reg < 16 ) - MOV16RtoM(_x86GetAddr(x86regs[x86reg].type, x86regs[x86reg].reg), x86reg); - else - MOV32RtoM(_x86GetAddr(x86regs[x86reg].type, x86regs[x86reg].reg), x86reg); - } - - x86regs[x86reg].mode &= ~MODE_WRITE; - x86regs[x86reg].inuse = 0; -} - -void _flushX86regs() -{ - int i; - - for (i=0; iregs[x86regs[i].reg]&EEINST_USED) ) { - return 1; - } - } - } - return 0; -} - -// EE -void _eeMoveGPRtoR(x86IntRegType to, int fromgpr) -{ - if( GPR_IS_CONST1(fromgpr) ) - MOV64ItoR( to, g_cpuConstRegs[fromgpr].UD[0] ); - else { - int mmreg; - - if( (mmreg = _checkX86reg(X86TYPE_GPR, fromgpr, MODE_READ)) >= 0) { - MOV64RtoR(to, mmreg); - } - if( (mmreg = _checkXMMreg(XMMTYPE_GPRREG, fromgpr, MODE_READ)) >= 0 && (xmmregs[mmreg].mode&MODE_WRITE)) { - SSE2_MOVQ_XMM_to_R(to, mmreg); - } - else { - MOV64MtoR(to, (uptr)&cpuRegs.GPR.r[ fromgpr ].UD[ 0 ] ); - } - } -} - -// 32 bit move -void _eeMoveGPRtoM(u32 to, int fromgpr) -{ - if( GPR_IS_CONST1(fromgpr) ) - MOV32ItoM( to, g_cpuConstRegs[fromgpr].UL[0] ); - else { - int mmreg; - - if( (mmreg = _checkX86reg(X86TYPE_GPR, fromgpr, MODE_READ)) >= 0 ) { - MOV32RtoM(to, mmreg); - } - if( (mmreg = _checkXMMreg(XMMTYPE_GPRREG, fromgpr, MODE_READ)) >= 0 ) { - SSEX_MOVD_XMM_to_M32(to, mmreg); - } - else { - MOV32MtoR(EAX, (uptr)&cpuRegs.GPR.r[ fromgpr ].UD[ 0 ] ); - MOV32RtoM(to, EAX ); - } - } -} - -void _eeMoveGPRtoRm(x86IntRegType to, int fromgpr) -{ - if( GPR_IS_CONST1(fromgpr) ) - MOV64ItoRmOffset( to, g_cpuConstRegs[fromgpr].UD[0], 0 ); - else { - int mmreg; - - if( (mmreg = _checkX86reg(X86TYPE_GPR, fromgpr, MODE_READ)) >= 0 ) { - MOV64RtoRmOffset(to, mmreg, 0); - } - if( (mmreg = _checkXMMreg(XMMTYPE_GPRREG, fromgpr, MODE_READ)) >= 0 ) { - SSEX_MOVD_XMM_to_Rm(to, mmreg); - } - else { - MOV64MtoR(RAX, (uptr)&cpuRegs.GPR.r[ fromgpr ].UD[ 0 ] ); - MOV64RtoRmOffset(to, RAX, 0 ); - } - } -} - -void _callPushArg(u32 arg, uptr argmem, x86IntRegType X86ARG) -{ - if( IS_X86REG(arg) ) { - if( (arg&0xff) != X86ARG ) { - _freeX86reg(X86ARG); - MOV64RtoR(X86ARG, (arg&0xf)); - } - } - else if( IS_GPRREG(arg) ) { - _allocX86reg(X86ARG, X86TYPE_GPR, arg&0xff, MODE_READ); - } - else if( IS_CONSTREG(arg) ) { - _freeX86reg(X86ARG); - MOV32ItoR(X86ARG, argmem); - } - else if( IS_EECONSTREG(arg) ) { - _freeX86reg(X86ARG); - MOV32ItoR(X86ARG, g_cpuConstRegs[(arg>>16)&0x1f].UD[0]); - } - else if( IS_PSXCONSTREG(arg) ) { - _freeX86reg(X86ARG); - MOV32ItoR(X86ARG, g_psxConstRegs[(arg>>16)&0x1f]); - } - else if( IS_MEMORYREG(arg) ) { - _freeX86reg(X86ARG); - MOV64MtoR(X86ARG, argmem); - } - else if( IS_XMMREG(arg) ) { - _freeX86reg(X86ARG); - SSEX_MOVD_XMM_to_Rm(X86ARG, arg&0xf); - } - else { - assert((arg&0xfff0)==0); - _freeX86reg(X86ARG); - MOV64RtoR(X86ARG, (arg&0xf)); - } -} - -void _callFunctionArg1(uptr fn, u32 arg1, uptr arg1mem) -{ - _callPushArg(arg1, arg1mem, X86ARG1); - CALLFunc((uptr)fn); -} - -void _callFunctionArg2(uptr fn, u32 arg1, u32 arg2, uptr arg1mem, uptr arg2mem) -{ - _callPushArg(arg1, arg1mem, X86ARG1); - _callPushArg(arg2, arg2mem, X86ARG2); - CALLFunc((uptr)fn); -} - -void _callFunctionArg3(uptr fn, u32 arg1, u32 arg2, u32 arg3, uptr arg1mem, uptr arg2mem, uptr arg3mem) -{ - _callPushArg(arg1, arg1mem, X86ARG1); - _callPushArg(arg2, arg2mem, X86ARG2); - _callPushArg(arg3, arg3mem, X86ARG3); - CALLFunc((uptr)fn); -} - -void _recPushReg(int mmreg) -{ - assert(0); -} - -void _signExtendSFtoM(u32 mem) -{ - assert(0); -} - -void _recMove128MtoM(u32 to, u32 from) -{ - MOV64MtoR(RAX, from); - MOV64RtoM(to, RAX); - MOV64MtoR(RAX, from+8); - MOV64RtoM(to+8, RAX); -} - -void _recMove128RmOffsettoM(u32 to, u32 offset) -{ - MOV64RmOffsettoR(RAX, RCX, offset); - MOV64RtoM(to, RAX); - MOV64RmOffsettoR(RAX, RCX, offset+8); - MOV64RtoM(to+8, RAX); -} - -void _recMove128MtoRmOffset(u32 offset, u32 from) -{ - MOV64MtoR(RAX, from); - MOV64RtoRmOffset(RCX, RAX, offset); - MOV64MtoR(RAX, from+8); - MOV64RtoRmOffset(RCX, RAX, offset+8); -} - -// 32 bit -void LogicalOp32RtoM(uptr to, x86IntRegType from, int op) -{ - switch(op) { - case 0: AND32RtoM(to, from); break; - case 1: OR32RtoM(to, from); break; - case 2: XOR32RtoM(to, from); break; - case 3: OR32RtoM(to, from); break; - } -} - -void LogicalOp32MtoR(x86IntRegType to, uptr from, int op) -{ - switch(op) { - case 0: AND32MtoR(to, from); break; - case 1: OR32MtoR(to, from); break; - case 2: XOR32MtoR(to, from); break; - case 3: OR32MtoR(to, from); break; - } -} - -void LogicalOp32ItoR(x86IntRegType to, u32 from, int op) -{ - switch(op) { - case 0: AND32ItoR(to, from); break; - case 1: OR32ItoR(to, from); break; - case 2: XOR32ItoR(to, from); break; - case 3: OR32ItoR(to, from); break; - } -} - -void LogicalOp32ItoM(uptr to, u32 from, int op) -{ - switch(op) { - case 0: AND32ItoM(to, from); break; - case 1: OR32ItoM(to, from); break; - case 2: XOR32ItoM(to, from); break; - case 3: OR32ItoM(to, from); break; - } -} - -// 64 bit -void LogicalOp64RtoR(x86IntRegType to, x86IntRegType from, int op) -{ - switch(op) { - case 0: AND64RtoR(to, from); break; - case 1: OR64RtoR(to, from); break; - case 2: XOR64RtoR(to, from); break; - case 3: OR64RtoR(to, from); break; - } -} - -void LogicalOp64RtoM(uptr to, x86IntRegType from, int op) -{ - switch(op) { - case 0: AND64RtoM(to, from); break; - case 1: OR64RtoM(to, from); break; - case 2: XOR64RtoM(to, from); break; - case 3: OR64RtoM(to, from); break; - } -} - -void LogicalOp64MtoR(x86IntRegType to, uptr from, int op) -{ - switch(op) { - case 0: AND64MtoR(to, from); break; - case 1: OR64MtoR(to, from); break; - case 2: XOR64MtoR(to, from); break; - case 3: OR64MtoR(to, from); break; - } -} - -#endif // PCSX2_NORECBUILD diff --git a/pcsx2v2/x86/ix86-64/iR5900-64.cpp b/pcsx2v2/x86/ix86-64/iR5900-64.cpp deleted file mode 100644 index a7d2650..0000000 --- a/pcsx2v2/x86/ix86-64/iR5900-64.cpp +++ /dev/null @@ -1,2754 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// 64 bit recompiler - difference between 32bit is that mmx is gone -// and x86 regs are now cached (also fancier block linking) (zerofrog) - -// liveness analysis/constant propagation Apr06 (zerofrog@gmail.com) -// stop compiling if NORECBUILD build (only for Visual Studio) -#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) - -#include -#include -#include -#include - -#include "Common.h" -#include "Memory.h" -#include "InterTables.h" -#include "ix86/ix86.h" -#include "iR5900.h" -#include "iR5900AritImm.h" -#include "iR5900Arit.h" -#include "iR5900MultDiv.h" -#include "iR5900Shift.h" -#include "iR5900Branch.h" -#include "iR5900Jump.h" -#include "iR5900LoadStore.h" -#include "iR5900Move.h" -#include "iMMI.h" -#include "iFPU.h" -#include "iCP0.h" -#include "iVUmicro.h" -#include "iVU0micro.h" -#include "iVU1micro.h" -#include "VU.h" -#include "VUmicro.h" - -#include "iVUzerorec.h" - -#ifdef _WIN32 -#pragma warning(disable:4244) -#pragma warning(disable:4761) -#endif - -u32 maxrecmem = 0; -uptr *recLUT=NULL; - -#define X86 -#define RECSTACK_SIZE 0x00010000 - -#define EE_NUMBLOCKS (1<<15) - -static char *recMem = NULL; // the recompiled blocks will be here -static char* recStack = NULL; // stack mem -static BASEBLOCK *recRAM = NULL; // and the ptr to the blocks here -static BASEBLOCK *recROM = NULL; // and here -static BASEBLOCK *recROM1 = NULL; // also here -static BASEBLOCKEX *recBlocks = NULL; -static char *recPtr = NULL, *recStackPtr = NULL; -static EEINST* s_pInstCache = NULL; -static u32 s_nInstCacheSize = 0; - -u32 g_EEFreezeRegs = 0; // if set, should freeze the regs - -static BASEBLOCK* s_pCurBlock = NULL; -static BASEBLOCKEX* s_pCurBlockEx = NULL; -static BASEBLOCK* s_pDispatchBlock = NULL; -static u32 s_nEndBlock = 0; // what pc the current block ends -static u32 s_nHasDelay = 0; - -static u32 s_nNextBlock = 0; // next free block in recBlocks - -extern void (*recBSC[64])(); -extern void (*recBSC_co[64])(); -extern void rpropBSC(EEINST* prev, EEINST* pinst); - -// save states for branches -static u16 s_savex86FpuState, s_saveiCWstate; -static GPR_reg64 s_ConstGPRreg; -static u32 s_saveConstGPRreg = 0, s_saveHasConstReg = 0, s_saveFlushedConstReg = 0, s_saveRegHasLive1 = 0, s_saveRegHasSignExt = 0; -static EEINST* s_psaveInstInfo = NULL; - -u32 s_nBlockCycles = 0; // cycles of current block recompiling -static u32 s_savenBlockCycles = 0; - -void recCOP2RecompileInst(); -int recCOP2AnalyzeBlock(u32 startpc, u32 endpc); -void recCOP2EndBlock(void); - -#ifdef _DEBUG -u32 dumplog = 0; -#else -#define dumplog 0 -#endif - -u32 pc; // recompiler pc -int branch; // set for branch - -//#ifdef PCSX2_DEVBUILD -LARGE_INTEGER lbase = {0}, lfinal = {0}; -static u32 s_startcount = 0; -//#endif - -void _cop2AnalyzeOp(EEINST* pinst, int dostalls); // reccop2.c -static void iBranchTest(u32 newpc, u32 cpuBranch); -void recRecompile( u32 startpc ); -void recCOP22( void ); - -BASEBLOCKEX* PC_GETBLOCKEX(BASEBLOCK* p) -{ -// BASEBLOCKEX* pex = *(BASEBLOCKEX**)(p+1); -// if( pex >= recBlocks && pex < recBlocks+EE_NUMBLOCKS ) -// return pex; - - // otherwise, use the sorted list - return GetBaseBlockEx(p->startpc, 0); -} - -//////////////////////////////////////////////////// -void iDumpBlock( int startpc, char * ptr ) -{ - FILE *f; - char filename[ 256 ]; - u32 i, j; - EEINST* pcur; - extern char *disRNameGPR[]; - u8 used[34]; - u8 fpuused[33]; - int numused, count, fpunumused; - char command[256]; - - SysPrintf( "dump %x:%x, %x\n", startpc, pc, cpuRegs.cycle ); -#ifdef _WIN32 - CreateDirectory("dumps", NULL); - sprintf( filename, "dumps\\dump%.8X.txt", startpc); -#else - mkdir("dumps", 0755); - sprintf( filename, "dumps/dump%.8X.txt", startpc); -#endif - - fflush( stdout ); - - f = fopen( filename, "w" ); - - for ( i = startpc; i < s_nEndBlock; i += 4 ) { - fprintf( f, "%s\n", disR5900Fasm( PSMu32( i ), i ) ); - } - - // write the instruction info - - fprintf(f, "\n\nlive0 - %x, live1 - %x, live2 - %x, lastuse - %x\nxmm - %x, used - %x\n", - EEINST_LIVE0, EEINST_LIVE1, EEINST_LIVE2, EEINST_LASTUSE, EEINST_XMM, EEINST_USED); - - memset(used, 0, sizeof(used)); - numused = 0; - for(i = 0; i < ARRAYSIZE(s_pInstCache->regs); ++i) { - if( s_pInstCache->regs[i] & EEINST_USED ) { - used[i] = 1; - numused++; - } - } - - memset(fpuused, 0, sizeof(fpuused)); - fpunumused = 0; - for(i = 0; i < ARRAYSIZE(s_pInstCache->fpuregs); ++i) { - if( s_pInstCache->fpuregs[i] & EEINST_USED ) { - fpuused[i] = 1; - fpunumused++; - } - } - - fprintf(f, " "); - for(i = 0; i < ARRAYSIZE(s_pInstCache->regs); ++i) { - if( used[i] ) fprintf(f, "%2d ", i); - } - for(i = 0; i < ARRAYSIZE(s_pInstCache->fpuregs); ++i) { - if( fpuused[i] ) fprintf(f, "%2d ", i); - } - fprintf(f, "\n"); - - fprintf(f, " "); - for(i = 0; i < ARRAYSIZE(s_pInstCache->regs); ++i) { - if( used[i] ) fprintf(f, "%s ", disRNameGPR[i]); - } - for(i = 0; i < ARRAYSIZE(s_pInstCache->fpuregs); ++i) { - if( fpuused[i] ) fprintf(f, "%s ", i<32?"FR":"FA"); - } - fprintf(f, "\n"); - - pcur = s_pInstCache+1; - for( i = 0; i < (s_nEndBlock-startpc)/4; ++i, ++pcur) { - fprintf(f, "%2d: %2.2x ", i+1, pcur->info); - - count = 1; - for(j = 0; j < ARRAYSIZE(s_pInstCache->regs); j++) { - if( used[j] ) { - fprintf(f, "%2.2x%s", pcur->regs[j], ((count%8)&&countfpuregs); j++) { - if( fpuused[j] ) { - fprintf(f, "%2.2x%s", pcur->fpuregs[j], ((count%8)&&count tempdump", filename ); - system( command ); - sprintf(command, "mv tempdump %s", filename); - system(command); - f = fopen( filename, "a+" ); -#endif -} - -u8 _eeLoadWritesRs(u32 tempcode) -{ - switch(tempcode>>26) { - case 26: // ldl - case 27: // ldr - case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 39: - case 55: // LD - case 30: // lq - return ((tempcode>>21)&0x1f)==((tempcode>>16)&0x1f); // rs==rt - } - return 0; -} - -u8 _eeIsLoadStoreCoIssue(u32 firstcode, u32 secondcode) -{ - switch(firstcode>>26) { - case 34: // lwl - return (secondcode>>26)==38; - case 38: // lwr - return (secondcode>>26)==34; - case 42: // swl - return (secondcode>>26)==46; - case 46: // swr - return (secondcode>>26)==42; - case 26: // ldl - return (secondcode>>26)==27; - case 27: // ldr - return (secondcode>>26)==26; - case 44: // sdl - return (secondcode>>26)==45; - case 45: // sdr - return (secondcode>>26)==44; - - case 32: case 33: case 35: case 36: case 37: case 39: - case 55: // LD - - // stores - case 40: case 41: case 43: - case 63: // sd - return (secondcode>>26)==(firstcode>>26); - - case 30: // lq - case 31: // sq - case 49: // lwc1 - case 57: // swc1 - case 54: // lqc2 - case 62: // sqc2 - return (secondcode>>26)==(firstcode>>26)&&cpucaps.hasStreamingSIMDExtensions; - } - return 0; -} - -u8 _eeIsLoadStoreCoX(u32 tempcode) -{ - switch( tempcode>>26 ) { - case 30: case 31: case 49: case 57: case 55: case 63: - return 1; - } - return 0; -} - -void _eeFlushAllUnused() -{ - int i; - for(i = 0; i < 34; ++i) { - if( pc < s_nEndBlock ) { - if( (g_pCurInstInfo[1].regs[i]&EEINST_USED) ) - continue; - } - else if( (g_pCurInstInfo[0].regs[i]&EEINST_USED) ) - continue; - - if( i < 32 && GPR_IS_CONST1(i) ) _flushConstReg(i); - else { - _deleteGPRtoXMMreg(i, 1); - } - } - - //TODO when used info is done for FPU and VU0 - for(i = 0; i < XMMREGS; ++i) { - if( xmmregs[i].inuse && xmmregs[i].type != XMMTYPE_GPRREG ) - _freeXMMreg(i); - } - for(i = 0; i < X86REGS; ++i) { - if( x86regs[i].inuse && x86regs[i].type != X86TYPE_GPR ) - _freeX86reg(i); - } -} - -u32* _eeGetConstReg(int reg) -{ - assert( GPR_IS_CONST1( reg ) ); - - if( g_cpuFlushedConstReg & (1<regs[xmmregs[i].reg]&EEINST_USED) ) { - if( !_recIsRegWritten(g_pCurInstInfo+1, (s_nEndBlock-pc)/4, XMMTYPE_GPRREG, xmmregs[i].reg) ) { - _freeXMMreg(i); - xmmregs[i].inuse = 1; - return 1; - } - } - } - - return 0; -} - -int _flushX86unused() -{ - int i; - for (i=0; iregs[x86regs[i].reg]&EEINST_USED) ) { - if( !_recIsRegWritten(g_pCurInstInfo+1, (s_nEndBlock-pc)/4, XMMTYPE_GPRREG, x86regs[i].reg) ) { - _freeX86reg(i); - x86regs[i].inuse = 1; - return 1; - } - } - } - - return 0; -} - -int _flushUnusedConstReg() -{ - int i; - for(i = 1; i < 32; ++i) { - if( (g_cpuHasConstReg & (1<>31) == g_cpuConstRegs[i].SL[1] ) - MOV64I32toM((uptr)&cpuRegs.GPR.r[i].UD[0], g_cpuConstRegs[i].UL[0]); - else { - MOV32ItoM((uptr)&cpuRegs.GPR.r[i].UL[0], g_cpuConstRegs[i].UL[0]); - MOV32ItoM((uptr)&cpuRegs.GPR.r[i].UL[1], g_cpuConstRegs[i].UL[1]); - } - - g_cpuFlushedConstReg |= 1<>31) == g_cpuConstRegs[reg].SL[1] ) - MOV64I32toM((uptr)&cpuRegs.GPR.r[reg].UD[0], g_cpuConstRegs[reg].UL[0]); - else { - MOV32ItoM((uptr)&cpuRegs.GPR.r[reg].UL[0], g_cpuConstRegs[reg].UL[0]); - MOV32ItoM((uptr)&cpuRegs.GPR.r[reg].UL[1], g_cpuConstRegs[reg].UL[1]); - } - - g_cpuFlushedConstReg |= (1<>31) == g_cpuConstRegs[i].SL[1] ) - MOV64I32toM((uptr)&cpuRegs.GPR.r[i].UD[0], g_cpuConstRegs[i].UL[0]); - else { - MOV32ItoM((uptr)&cpuRegs.GPR.r[i].UL[0], g_cpuConstRegs[i].UL[0]); - MOV32ItoM((uptr)&cpuRegs.GPR.r[i].UL[1], g_cpuConstRegs[i].UL[1]); - } - g_cpuFlushedConstReg |= 1<regs[reg]&EEINST_LASTUSE) ) { - if( usex86 ) return _allocX86reg(-1, X86TYPE_GPR, reg, mode); - return _allocGPRtoXMMreg(-1, reg, mode); - } - - return -1; -} - -#define PROCESS_EE_SETMODES(mmreg) 0//((mmxregs[mmreg].mode&MODE_WRITE)?PROCESS_EE_MODEWRITES:0) -#define PROCESS_EE_SETMODET(mmreg) 0//((mmxregs[mmreg].mode&MODE_WRITE)?PROCESS_EE_MODEWRITET:0) - -// ignores XMMINFO_READS, XMMINFO_READT, and XMMINFO_READD_LO from xmminfo -// core of reg caching -void eeRecompileCode0(R5900FNPTR constcode, R5900FNPTR_INFO constscode, R5900FNPTR_INFO consttcode, R5900FNPTR_INFO noconstcode, int xmminfo) -{ - int mmreg1, mmreg2, mmreg3, mmtemp, moded; - - if ( ! _Rd_ && (xmminfo&XMMINFO_WRITED) ) return; - - if( xmminfo&XMMINFO_WRITED) { - CHECK_SAVE_REG(_Rd_); - _eeProcessHasLive(_Rd_, 0); - EEINST_RESETSIGNEXT(_Rd_); - } - - if( GPR_IS_CONST2(_Rs_, _Rt_) ) { - if( xmminfo & XMMINFO_WRITED ) { - _deleteGPRtoXMMreg(_Rd_, 2); - } - if( xmminfo&XMMINFO_WRITED ) GPR_SET_CONST(_Rd_); - constcode(); - return; - } - - moded = MODE_WRITE|((xmminfo&XMMINFO_READD)?MODE_READ:0); - - // test if should write xmm, mirror to mmx code - if( g_pCurInstInfo->info & EEINST_XMM ) { - - if( xmminfo & (XMMINFO_READLO|XMMINFO_WRITELO) ) _addNeededGPRtoXMMreg(XMMGPR_LO); - if( xmminfo & (XMMINFO_READHI|XMMINFO_WRITEHI) ) _addNeededGPRtoXMMreg(XMMGPR_HI); - _addNeededGPRtoXMMreg(_Rs_); - _addNeededGPRtoXMMreg(_Rt_); - - if( GPR_IS_CONST1(_Rs_) || GPR_IS_CONST1(_Rt_) ) { - int creg = GPR_IS_CONST1(_Rs_) ? _Rs_ : _Rt_; - int vreg = creg == _Rs_ ? _Rt_ : _Rs_; - -// if(g_pCurInstInfo->regs[vreg]&EEINST_XMM) { -// mmreg1 = _allocGPRtoXMMreg(-1, vreg, MODE_READ); -// _addNeededGPRtoXMMreg(vreg); -// } - mmreg1 = _allocCheckGPRtoXMM(g_pCurInstInfo, vreg, MODE_READ); - - if( mmreg1 >= 0 ) { - int info = PROCESS_EE_XMM; - - if( GPR_IS_CONST1(_Rs_) ) info |= PROCESS_EE_SETMODET(mmreg1); - else info |= PROCESS_EE_SETMODES(mmreg1); - - if( xmminfo & XMMINFO_WRITED ) { - - _addNeededGPRtoXMMreg(_Rd_); - mmreg3 = _checkXMMreg(XMMTYPE_GPRREG, _Rd_, MODE_WRITE); - - if( !(xmminfo&XMMINFO_READD) && mmreg3 < 0 && ((g_pCurInstInfo->regs[vreg] & EEINST_LASTUSE) || !EEINST_ISLIVEXMM(vreg)) ) { - _freeXMMreg(mmreg1); - if( GPR_IS_CONST1(_Rs_) ) info &= ~PROCESS_EE_MODEWRITET; - else info &= ~PROCESS_EE_MODEWRITES; - xmmregs[mmreg1].inuse = 1; - xmmregs[mmreg1].reg = _Rd_; - xmmregs[mmreg1].mode = moded; - mmreg3 = mmreg1; - } - else if( mmreg3 < 0 ) mmreg3 = _allocGPRtoXMMreg(-1, _Rd_, moded); - - info |= PROCESS_EE_SET_D(mmreg3); - } - - if( xmminfo & (XMMINFO_READLO|XMMINFO_WRITELO) ) { - mmtemp = eeProcessHILO(XMMGPR_LO, ((xmminfo&XMMINFO_READLO)?MODE_READ:0)|((xmminfo&XMMINFO_WRITELO)?MODE_WRITE:0), 0); - if( mmtemp >= 0 ) info |= PROCESS_EE_SET_LO(mmtemp); - } - if( xmminfo & (XMMINFO_READHI|XMMINFO_WRITEHI) ) { - mmtemp = eeProcessHILO(XMMGPR_HI, ((xmminfo&XMMINFO_READLO)?MODE_READ:0)|((xmminfo&XMMINFO_WRITELO)?MODE_WRITE:0), 0); - if( mmtemp >= 0 ) info |= PROCESS_EE_SET_HI(mmtemp); - } - - if( creg == _Rs_ ) constscode(info|PROCESS_EE_SET_T(mmreg1)); - else consttcode(info|PROCESS_EE_SET_S(mmreg1)); - _clearNeededXMMregs(); - if( xmminfo & XMMINFO_WRITED ) GPR_DEL_CONST(_Rd_); - return; - } - } - else { - // no const regs - mmreg1 = _allocCheckGPRtoXMM(g_pCurInstInfo, _Rs_, MODE_READ); - mmreg2 = _allocCheckGPRtoXMM(g_pCurInstInfo, _Rt_, MODE_READ); - - if( mmreg1 >= 0 || mmreg2 >= 0 ) { - int info = PROCESS_EE_XMM; - - // do it all in xmm - if( mmreg1 < 0 ) mmreg1 = _allocGPRtoXMMreg(-1, _Rs_, MODE_READ); - if( mmreg2 < 0 ) mmreg2 = _allocGPRtoXMMreg(-1, _Rt_, MODE_READ); - - info |= PROCESS_EE_SETMODES(mmreg1)|PROCESS_EE_SETMODET(mmreg2); - - if( xmminfo & XMMINFO_WRITED ) { - // check for last used, if so don't alloc a new XMM reg - _addNeededGPRtoXMMreg(_Rd_); - mmreg3 = _checkXMMreg(XMMTYPE_GPRREG, _Rd_, moded); - - if( mmreg3 < 0 ) { - if( !(xmminfo&XMMINFO_READD) && ((g_pCurInstInfo->regs[_Rt_] & EEINST_LASTUSE) || !EEINST_ISLIVEXMM(_Rt_)) ) { - _freeXMMreg(mmreg2); - info &= ~PROCESS_EE_MODEWRITET; - xmmregs[mmreg2].inuse = 1; - xmmregs[mmreg2].reg = _Rd_; - xmmregs[mmreg2].mode = moded; - mmreg3 = mmreg2; - } - else if( !(xmminfo&XMMINFO_READD) && ((g_pCurInstInfo->regs[_Rs_] & EEINST_LASTUSE) || !EEINST_ISLIVEXMM(_Rs_)) ) { - _freeXMMreg(mmreg1); - info &= ~PROCESS_EE_MODEWRITES; - xmmregs[mmreg1].inuse = 1; - xmmregs[mmreg1].reg = _Rd_; - xmmregs[mmreg1].mode = moded; - mmreg3 = mmreg1; - } - else mmreg3 = _allocGPRtoXMMreg(-1, _Rd_, moded); - } - - info |= PROCESS_EE_SET_D(mmreg3); - } - - if( xmminfo & (XMMINFO_READLO|XMMINFO_WRITELO) ) { - mmtemp = eeProcessHILO(XMMGPR_LO, ((xmminfo&XMMINFO_READLO)?MODE_READ:0)|((xmminfo&XMMINFO_WRITELO)?MODE_WRITE:0), 0); - if( mmtemp >= 0 ) info |= PROCESS_EE_SET_LO(mmtemp); - } - if( xmminfo & (XMMINFO_READHI|XMMINFO_WRITEHI) ) { - mmtemp = eeProcessHILO(XMMGPR_HI, ((xmminfo&XMMINFO_READLO)?MODE_READ:0)|((xmminfo&XMMINFO_WRITELO)?MODE_WRITE:0), 0); - if( mmtemp >= 0 ) info |= PROCESS_EE_SET_HI(mmtemp); - } - - noconstcode(info|PROCESS_EE_SET_S(mmreg1)|PROCESS_EE_SET_T(mmreg2)); - _clearNeededXMMregs(); - if( xmminfo & XMMINFO_WRITED ) GPR_DEL_CONST(_Rd_); - return; - } - } - - _clearNeededXMMregs(); - } - - // regular x86 - _deleteGPRtoXMMreg(_Rs_, 1); - _deleteGPRtoXMMreg(_Rt_, 1); - if( xmminfo&XMMINFO_WRITED ) - _deleteGPRtoXMMreg(_Rd_, (xmminfo&XMMINFO_READD)?0:2); - - if( GPR_IS_CONST1(_Rs_) ) { - constscode(0); - if( xmminfo&XMMINFO_WRITED ) GPR_DEL_CONST(_Rd_); - return; - } - - if( GPR_IS_CONST1(_Rt_) ) { - consttcode(0); - if( xmminfo&XMMINFO_WRITED ) GPR_DEL_CONST(_Rd_); - return; - } - - noconstcode(0); - if( xmminfo&XMMINFO_WRITED ) GPR_DEL_CONST(_Rd_); -} - -// rt = rs op imm16 -void eeRecompileCode1(R5900FNPTR constcode, R5900FNPTR_INFO noconstcode) -{ - int mmreg1, mmreg2; - if ( ! _Rt_ ) return; - - CHECK_SAVE_REG(_Rt_); - _eeProcessHasLive(_Rt_, 0); - EEINST_RESETSIGNEXT(_Rt_); - - if( GPR_IS_CONST1(_Rs_) ) { - _deleteGPRtoXMMreg(_Rt_, 2); - GPR_SET_CONST(_Rt_); - constcode(); - return; - } - - // test if should write xmm, mirror to mmx code - if( g_pCurInstInfo->info & EEINST_XMM ) { - - // no const regs - mmreg1 = _allocCheckGPRtoXMM(g_pCurInstInfo, _Rs_, MODE_READ); - - if( mmreg1 >= 0 ) { - int info = PROCESS_EE_XMM|PROCESS_EE_SETMODES(mmreg1); - - // check for last used, if so don't alloc a new XMM reg - _addNeededGPRtoXMMreg(_Rt_); - mmreg2 = _checkXMMreg(XMMTYPE_GPRREG, _Rt_, MODE_WRITE); - - if( mmreg2 < 0 ) { - if( (g_pCurInstInfo->regs[_Rs_] & EEINST_LASTUSE) || !EEINST_ISLIVEXMM(_Rs_) ) { - _freeXMMreg(mmreg1); - info &= ~PROCESS_EE_MODEWRITES; - xmmregs[mmreg1].inuse = 1; - xmmregs[mmreg1].reg = _Rt_; - xmmregs[mmreg1].mode = MODE_WRITE|MODE_READ; - mmreg2 = mmreg1; - } - else mmreg2 = _allocGPRtoXMMreg(-1, _Rt_, MODE_WRITE); - } - - noconstcode(info|PROCESS_EE_SET_S(mmreg1)|PROCESS_EE_SET_T(mmreg2)); - _clearNeededXMMregs(); - GPR_DEL_CONST(_Rt_); - return; - } - - _clearNeededXMMregs(); - } - - // regular x86 - _deleteGPRtoXMMreg(_Rs_, 1); - _deleteGPRtoXMMreg(_Rt_, 2); - - noconstcode(0); - GPR_DEL_CONST(_Rt_); -} - -// rd = rt op sa -void eeRecompileCode2(R5900FNPTR constcode, R5900FNPTR_INFO noconstcode) -{ - int mmreg1, mmreg2; - if ( ! _Rd_ ) return; - - CHECK_SAVE_REG(_Rd_); - _eeProcessHasLive(_Rd_, 0); - EEINST_RESETSIGNEXT(_Rd_); - - if( GPR_IS_CONST1(_Rt_) ) { - _deleteGPRtoXMMreg(_Rd_, 2); - GPR_SET_CONST(_Rd_); - constcode(); - return; - } - - // test if should write xmm, mirror to mmx code - if( g_pCurInstInfo->info & EEINST_XMM ) { - - // no const regs - mmreg1 = _allocCheckGPRtoXMM(g_pCurInstInfo, _Rt_, MODE_READ); - - if( mmreg1 >= 0 ) { - int info = PROCESS_EE_XMM|PROCESS_EE_SETMODET(mmreg1); - - // check for last used, if so don't alloc a new XMM reg - _addNeededGPRtoXMMreg(_Rd_); - mmreg2 = _checkXMMreg(XMMTYPE_GPRREG, _Rd_, MODE_WRITE); - - if( mmreg2 < 0 ) { - if( (g_pCurInstInfo->regs[_Rt_] & EEINST_LASTUSE) || !EEINST_ISLIVE64(_Rt_) ) { - _freeXMMreg(mmreg1); - info &= ~PROCESS_EE_MODEWRITET; - xmmregs[mmreg1].inuse = 1; - xmmregs[mmreg1].reg = _Rd_; - xmmregs[mmreg1].mode = MODE_WRITE|MODE_READ; - mmreg2 = mmreg1; - } - else mmreg2 = _allocGPRtoXMMreg(-1, _Rd_, MODE_WRITE); - } - - noconstcode(info|PROCESS_EE_SET_T(mmreg1)|PROCESS_EE_SET_D(mmreg2)); - _clearNeededXMMregs(); - GPR_DEL_CONST(_Rd_); - return; - } - - _clearNeededXMMregs(); - } - - // regular x86 - _deleteGPRtoXMMreg(_Rt_, 1); - _deleteGPRtoXMMreg(_Rd_, 2); - - noconstcode(0); - GPR_DEL_CONST(_Rd_); -} - -// rt op rs -void eeRecompileCode3(R5900FNPTR constcode, R5900FNPTR_INFO multicode) -{ - assert(0); - // for now, don't support xmm - _deleteEEreg(_Rs_, 1); - _deleteEEreg(_Rt_, 1); - - if( GPR_IS_CONST2(_Rs_, _Rt_) ) { - constcode(); - return; - } - - if( GPR_IS_CONST1(_Rs_) ) { - //multicode(PROCESS_EE_CONSTT); - return; - } - - if( GPR_IS_CONST1(_Rt_) ) { - //multicode(PROCESS_EE_CONSTT); - return; - } - - multicode(0); -} - -// Simple Code Templates // - -// rd = rs op rt -void eeRecompileCodeConst0(R5900FNPTR constcode, R5900FNPTR_INFO constscode, R5900FNPTR_INFO consttcode, R5900FNPTR_INFO noconstcode) -{ - if ( ! _Rd_ ) return; - - // for now, don't support xmm - CHECK_SAVE_REG(_Rd_); - - _deleteGPRtoXMMreg(_Rs_, 1); - _deleteGPRtoXMMreg(_Rt_, 1); - _deleteGPRtoXMMreg(_Rd_, 0); - - if( GPR_IS_CONST2(_Rs_, _Rt_) ) { - GPR_SET_CONST(_Rd_); - constcode(); - return; - } - - if( GPR_IS_CONST1(_Rs_) ) { - constscode(0); - GPR_DEL_CONST(_Rd_); - return; - } - - if( GPR_IS_CONST1(_Rt_) ) { - consttcode(0); - GPR_DEL_CONST(_Rd_); - return; - } - - noconstcode(0); - GPR_DEL_CONST(_Rd_); -} - -// rt = rs op imm16 -void eeRecompileCodeConst1(R5900FNPTR constcode, R5900FNPTR_INFO noconstcode) -{ - if ( ! _Rt_ ) return; - - // for now, don't support xmm - CHECK_SAVE_REG(_Rt_); - - _deleteGPRtoXMMreg(_Rs_, 1); - _deleteGPRtoXMMreg(_Rt_, 0); - - if( GPR_IS_CONST1(_Rs_) ) { - GPR_SET_CONST(_Rt_); - constcode(); - return; - } - - noconstcode(0); - GPR_DEL_CONST(_Rt_); -} - -// rd = rt op sa -void eeRecompileCodeConst2(R5900FNPTR constcode, R5900FNPTR_INFO noconstcode) -{ - if ( ! _Rd_ ) return; - - // for now, don't support xmm - CHECK_SAVE_REG(_Rd_); - - _deleteGPRtoXMMreg(_Rt_, 1); - _deleteGPRtoXMMreg(_Rd_, 0); - - if( GPR_IS_CONST1(_Rt_) ) { - GPR_SET_CONST(_Rd_); - constcode(); - return; - } - - noconstcode(0); - GPR_DEL_CONST(_Rd_); -} - -// rd = rt MULT rs (SPECIAL) -void eeRecompileCodeConstSPECIAL(R5900FNPTR constcode, R5900FNPTR_INFO multicode, int MULT) -{ - assert(0); - // for now, don't support xmm - if( MULT ) { - CHECK_SAVE_REG(_Rd_); - _deleteGPRtoXMMreg(_Rd_, 0); - } - - _deleteGPRtoXMMreg(_Rs_, 1); - _deleteGPRtoXMMreg(_Rt_, 1); - - if( GPR_IS_CONST2(_Rs_, _Rt_) ) { - if( MULT && _Rd_ ) GPR_SET_CONST(_Rd_); - constcode(); - return; - } - - if( GPR_IS_CONST1(_Rs_) ) { - //multicode(PROCESS_EE_CONSTS); - if( MULT && _Rd_ ) GPR_DEL_CONST(_Rd_); - return; - } - - if( GPR_IS_CONST1(_Rt_) ) { - //multicode(PROCESS_EE_CONSTT); - if( MULT && _Rd_ ) GPR_DEL_CONST(_Rd_); - return; - } - - multicode(0); - if( MULT && _Rd_ ) GPR_DEL_CONST(_Rd_); -} - -// EE XMM allocation code -int eeRecompileCodeXMM(int xmminfo) -{ - int info = PROCESS_EE_XMM; - - // save state - if( xmminfo & XMMINFO_WRITED ) { - CHECK_SAVE_REG(_Rd_); - _eeProcessHasLive(_Rd_, 0); - EEINST_RESETSIGNEXT(_Rd_); - } - - // flush consts - if( xmminfo & XMMINFO_READT ) { - if( GPR_IS_CONST1( _Rt_ ) && !(g_cpuFlushedConstReg&(1<<_Rt_)) ) { - MOV32ItoM((uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ], g_cpuConstRegs[_Rt_].UL[0]); - MOV32ItoM((uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], g_cpuConstRegs[_Rt_].UL[1]); - g_cpuFlushedConstReg |= (1<<_Rt_); - } - } - if( xmminfo & XMMINFO_READS) { - if( GPR_IS_CONST1( _Rs_ ) && !(g_cpuFlushedConstReg&(1<<_Rs_)) ) { - MOV32ItoM((uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ], g_cpuConstRegs[_Rs_].UL[0]); - MOV32ItoM((uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 1 ], g_cpuConstRegs[_Rs_].UL[1]); - g_cpuFlushedConstReg |= (1<<_Rs_); - } - } - - if( xmminfo & XMMINFO_WRITED ) { - GPR_DEL_CONST(_Rd_); - } - - // add needed - if( xmminfo & (XMMINFO_READLO|XMMINFO_WRITELO) ) { - _addNeededGPRtoXMMreg(XMMGPR_LO); - } - if( xmminfo & (XMMINFO_READHI|XMMINFO_WRITEHI) ) { - _addNeededGPRtoXMMreg(XMMGPR_HI); - } - if( xmminfo & XMMINFO_READS) _addNeededGPRtoXMMreg(_Rs_); - if( xmminfo & XMMINFO_READT) _addNeededGPRtoXMMreg(_Rt_); - if( xmminfo & XMMINFO_WRITED ) _addNeededGPRtoXMMreg(_Rd_); - - // allocate - if( xmminfo & XMMINFO_READS) { - int reg = _allocGPRtoXMMreg(-1, _Rs_, MODE_READ); - info |= PROCESS_EE_SET_S(reg)|PROCESS_EE_SETMODES(reg); - } - if( xmminfo & XMMINFO_READT) { - int reg = _allocGPRtoXMMreg(-1, _Rt_, MODE_READ); - info |= PROCESS_EE_SET_T(reg)|PROCESS_EE_SETMODET(reg); - } - - if( xmminfo & XMMINFO_WRITED ) { - int readd = MODE_WRITE|((xmminfo&XMMINFO_READD)?((xmminfo&XMMINFO_READD_LO)?(MODE_READ|MODE_READHALF):MODE_READ):0); - - int regd = _checkXMMreg(XMMTYPE_GPRREG, _Rd_, readd); - - if( regd < 0 ) { - if( !(xmminfo&XMMINFO_READD) && (xmminfo & XMMINFO_READT) && (_Rt_ == 0 || (g_pCurInstInfo->regs[_Rt_] & EEINST_LASTUSE) || !EEINST_ISLIVEXMM(_Rt_)) ) { - _freeXMMreg(EEREC_T); - _deleteX86reg(X86TYPE_GPR, _Rd_, 2); - xmmregs[EEREC_T].inuse = 1; - xmmregs[EEREC_T].reg = _Rd_; - xmmregs[EEREC_T].mode = readd; - regd = EEREC_T; - } - else if( !(xmminfo&XMMINFO_READD) && (xmminfo & XMMINFO_READS) && (_Rs_ == 0 || (g_pCurInstInfo->regs[_Rs_] & EEINST_LASTUSE) || !EEINST_ISLIVEXMM(_Rs_)) ) { - _freeXMMreg(EEREC_S); - _deleteX86reg(X86TYPE_GPR, _Rd_, 2); - xmmregs[EEREC_S].inuse = 1; - xmmregs[EEREC_S].reg = _Rd_; - xmmregs[EEREC_S].mode = readd; - regd = EEREC_S; - } - else regd = _allocGPRtoXMMreg(-1, _Rd_, readd); - } - - info |= PROCESS_EE_SET_D(regd); - } - if( xmminfo & (XMMINFO_READLO|XMMINFO_WRITELO) ) { - info |= PROCESS_EE_SET_LO(_allocGPRtoXMMreg(-1, XMMGPR_LO, ((xmminfo&XMMINFO_READLO)?MODE_READ:0)|((xmminfo&XMMINFO_WRITELO)?MODE_WRITE:0))); - info |= PROCESS_EE_LO; - } - if( xmminfo & (XMMINFO_READHI|XMMINFO_WRITEHI) ) { - info |= PROCESS_EE_SET_HI(_allocGPRtoXMMreg(-1, XMMGPR_HI, ((xmminfo&XMMINFO_READHI)?MODE_READ:0)|((xmminfo&XMMINFO_WRITEHI)?MODE_WRITE:0))); - info |= PROCESS_EE_HI; - } - return info; -} - -// EE COP1(FPU) XMM allocation code -#define _Ft_ _Rt_ -#define _Fs_ _Rd_ -#define _Fd_ _Sa_ - -#define PROCESS_EE_SETMODES_XMM(mmreg) ((xmmregs[mmreg].mode&MODE_WRITE)?PROCESS_EE_MODEWRITES:0) -#define PROCESS_EE_SETMODET_XMM(mmreg) ((xmmregs[mmreg].mode&MODE_WRITE)?PROCESS_EE_MODEWRITET:0) - -// rd = rs op rt -void eeFPURecompileCode(R5900FNPTR_INFO xmmcode, R5900FNPTR_INFO fpucode, int xmminfo) -{ - int mmregs=-1, mmregt=-1, mmregd=-1, mmregacc=-1; - if( fpucode == NULL || (EE_FPU_REGCACHING && cpucaps.hasStreamingSIMDExtensions) ) { - int info = PROCESS_EE_XMM; - - if( xmminfo & XMMINFO_READS ) _addNeededFPtoXMMreg(_Fs_); - if( xmminfo & XMMINFO_READT ) _addNeededFPtoXMMreg(_Ft_); - if( xmminfo & (XMMINFO_WRITED|XMMINFO_READD) ) _addNeededFPtoXMMreg(_Fd_); - if( xmminfo & (XMMINFO_WRITEACC|XMMINFO_READACC) ) _addNeededFPACCtoXMMreg(); - - if( xmminfo & XMMINFO_READT ) { - if( g_pCurInstInfo->fpuregs[_Ft_] & EEINST_LASTUSE ) mmregt = _checkXMMreg(XMMTYPE_FPREG, _Ft_, MODE_READ); - else mmregt = _allocFPtoXMMreg(-1, _Ft_, MODE_READ); - } - - if( xmminfo & XMMINFO_READS ) { - if( (!(xmminfo&XMMINFO_READT)||mmregt>=0) && (g_pCurInstInfo->fpuregs[_Fs_] & EEINST_LASTUSE) ) - mmregs = _checkXMMreg(XMMTYPE_FPREG, _Fs_, MODE_READ); - else mmregs = _allocFPtoXMMreg(-1, _Fs_, MODE_READ); - } - - if( mmregs >= 0 ) info |= PROCESS_EE_SETMODES_XMM(mmregs); - if( mmregt >= 0 ) info |= PROCESS_EE_SETMODET_XMM(mmregt); - - if( xmminfo & XMMINFO_READD ) { - assert( xmminfo & XMMINFO_WRITED ); - mmregd = _allocFPtoXMMreg(-1, _Fd_, MODE_READ); - } - - if( xmminfo & XMMINFO_READACC ) { - if( !(xmminfo&XMMINFO_WRITEACC) && (g_pCurInstInfo->fpuregs[_Ft_] & EEINST_LASTUSE) ) - mmregacc = _checkXMMreg(XMMTYPE_FPACC, 0, MODE_READ); - else mmregacc = _allocFPACCtoXMMreg(-1, MODE_READ); - } - - if( xmminfo & XMMINFO_WRITEACC ) { - - // check for last used, if so don't alloc a new XMM reg - int readacc = MODE_WRITE|((xmminfo&XMMINFO_READACC)?MODE_READ:0); - - mmregacc = _checkXMMreg(XMMTYPE_FPACC, 0, readacc); - - if( mmregacc < 0 ) { - if( (xmminfo&XMMINFO_READT) && mmregt >= 0 && (FPUINST_LASTUSE(_Ft_) || !FPUINST_ISLIVE(_Ft_)) ) { - if( FPUINST_ISLIVE(_Ft_) ) { - _freeXMMreg(mmregt); - info &= ~PROCESS_EE_MODEWRITET; - } - xmmregs[mmregt].inuse = 1; - xmmregs[mmregt].reg = 0; - xmmregs[mmregt].mode = readacc; - xmmregs[mmregt].type = XMMTYPE_FPACC; - mmregacc = mmregt; - } - else if( (xmminfo&XMMINFO_READS) && mmregs >= 0 && (FPUINST_LASTUSE(_Fs_) || !FPUINST_ISLIVE(_Fs_)) ) { - if( FPUINST_ISLIVE(_Fs_) ) { - _freeXMMreg(mmregs); - info &= ~PROCESS_EE_MODEWRITES; - } - xmmregs[mmregs].inuse = 1; - xmmregs[mmregs].reg = 0; - xmmregs[mmregs].mode = readacc; - xmmregs[mmregs].type = XMMTYPE_FPACC; - mmregacc = mmregs; - } - else mmregacc = _allocFPACCtoXMMreg(-1, readacc); - } - - xmmregs[mmregacc].mode |= MODE_WRITE; - } - else if( xmminfo & XMMINFO_WRITED ) { - // check for last used, if so don't alloc a new XMM reg - int readd = MODE_WRITE|((xmminfo&XMMINFO_READD)?MODE_READ:0); - if( xmminfo&XMMINFO_READD ) mmregd = _allocFPtoXMMreg(-1, _Fd_, readd); - else mmregd = _checkXMMreg(XMMTYPE_FPREG, _Fd_, readd); - - if( mmregd < 0 ) { - if( (xmminfo&XMMINFO_READT) && mmregt >= 0 && (FPUINST_LASTUSE(_Ft_) || !FPUINST_ISLIVE(_Ft_)) ) { - if( FPUINST_ISLIVE(_Ft_) ) { - _freeXMMreg(mmregt); - info &= ~PROCESS_EE_MODEWRITET; - } - xmmregs[mmregt].inuse = 1; - xmmregs[mmregt].reg = _Fd_; - xmmregs[mmregt].mode = readd; - mmregd = mmregt; - } - else if( (xmminfo&XMMINFO_READS) && mmregs >= 0 && (FPUINST_LASTUSE(_Fs_) || !FPUINST_ISLIVE(_Fs_)) ) { - if( FPUINST_ISLIVE(_Fs_) ) { - _freeXMMreg(mmregs); - info &= ~PROCESS_EE_MODEWRITES; - } - xmmregs[mmregs].inuse = 1; - xmmregs[mmregs].reg = _Fd_; - xmmregs[mmregs].mode = readd; - mmregd = mmregs; - } - else if( (xmminfo&XMMINFO_READACC) && mmregacc >= 0 && (FPUINST_LASTUSE(XMMFPU_ACC) || !FPUINST_ISLIVE(XMMFPU_ACC)) ) { - if( FPUINST_ISLIVE(XMMFPU_ACC) ) - _freeXMMreg(mmregacc); - xmmregs[mmregacc].inuse = 1; - xmmregs[mmregacc].reg = _Fd_; - xmmregs[mmregacc].mode = readd; - xmmregs[mmregacc].type = XMMTYPE_FPREG; - mmregd = mmregacc; - } - else mmregd = _allocFPtoXMMreg(-1, _Fd_, readd); - } - } - - assert( mmregs >= 0 || mmregt >= 0 || mmregd >= 0 || mmregacc >= 0 ); - - if( xmminfo & XMMINFO_WRITED ) { - assert( mmregd >= 0 ); - info |= PROCESS_EE_SET_D(mmregd); - } - if( xmminfo & (XMMINFO_WRITEACC|XMMINFO_READACC) ) { - if( mmregacc >= 0 ) info |= PROCESS_EE_SET_ACC(mmregacc)|PROCESS_EE_ACC; - else assert( !(xmminfo&XMMINFO_WRITEACC)); - } - - if( xmminfo & XMMINFO_READS ) { - if( mmregs >= 0 ) info |= PROCESS_EE_SET_S(mmregs)|PROCESS_EE_S; - } - if( xmminfo & XMMINFO_READT ) { - if( mmregt >= 0 ) info |= PROCESS_EE_SET_T(mmregt)|PROCESS_EE_T; - } - - // at least one must be in xmm - if( (xmminfo & (XMMINFO_READS|XMMINFO_READT)) == (XMMINFO_READS|XMMINFO_READT) ) { - assert( mmregs >= 0 || mmregt >= 0 ); - } - - xmmcode(info); - _clearNeededXMMregs(); - return; - } - - if( xmminfo & XMMINFO_READS ) _deleteFPtoXMMreg(_Fs_, 0); - if( xmminfo & XMMINFO_READT ) _deleteFPtoXMMreg(_Ft_, 0); - if( xmminfo & (XMMINFO_READD|XMMINFO_WRITED) ) _deleteFPtoXMMreg(_Fd_, 0); - if( xmminfo & (XMMINFO_READACC|XMMINFO_WRITEACC) ) _deleteFPtoXMMreg(XMMFPU_ACC, 0); - fpucode(0); -} - -#undef _Ft_ -#undef _Fs_ -#undef _Fd_ - -//////////////////////////////////////////////////// -extern u8 g_MACFlagTransform[256]; // for vus - -u32 g_sseMXCSR = 0x9f80; // disable all exception, round to 0, flush to 0 -u32 g_sseVUMXCSR = 0xff80; - -#if defined(_MSC_VER) -#include -#endif - -void SetCPUState(u32 sseMXCSR, u32 sseVUMXCSR) -{ - // SSE STATE // - // WARNING: do not touch unless you know what you are doing - - if( cpucaps.hasStreamingSIMDExtensions ) { - g_sseMXCSR = sseMXCSR; - g_sseVUMXCSR = sseVUMXCSR; - // do NOT set Denormals-Are-Zero flag (charlie and chocfac messes up) - //g_sseMXCSR = 0x9f80; // changing the rounding mode to 0x2000 (near) kills grandia III! - // changing the rounding mode to 0x0000 or 0x4000 totally kills gitaroo - // so... grandia III wins (you can change individual games with the 'roundmode' patch command) - -#ifdef _MSC_VER - _mm_setcsr(g_sseMXCSR); // set the new sse control -#else - __asm__("ldmxcsr %0" : : "m"(g_sseMXCSR) ); -#endif - //g_sseVUMXCSR = g_sseMXCSR|0x6000; - } -} - -extern BOOL install_my_handler(); - -#define REC_CACHEMEM 0x01000000 - -int recInit( void ) -{ - int i; - u32 startaddr; - const u8 macarr[16] = {0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15 }; - - startaddr = 0x0d000000; - while(!(startaddr & 0xf0000000)) { - recMem = (char*)SysMmap(startaddr, REC_CACHEMEM); - if( (uptr)recMem & 0xf0000000 ) { - SysMunmap((uptr)recMem, REC_CACHEMEM); recMem = NULL; - startaddr += 0x00100000; - continue; - } - else break; - } - - if( (uptr)recMem & 0xf0000000 ) { - SysPrintf("R5900 bad rec memory allocation\n"); - return 1; - } - - recLUT = (uptr*) _aligned_malloc( 0x010000 * sizeof(uptr), 16 ); - memset( recLUT, 0, 0x010000 * sizeof(uptr) ); - - // 32 alignment necessary - recRAM = (BASEBLOCK*) _aligned_malloc( sizeof(BASEBLOCK)/4*0x02000000 , 4*sizeof(BASEBLOCK)); - recROM = (BASEBLOCK*) _aligned_malloc( sizeof(BASEBLOCK)/4*0x00400000 , 4*sizeof(BASEBLOCK)); - recROM1= (BASEBLOCK*) _aligned_malloc( sizeof(BASEBLOCK)/4*0x00040000 , 4*sizeof(BASEBLOCK)); - recBlocks = (BASEBLOCKEX*) _aligned_malloc( sizeof(BASEBLOCKEX)*EE_NUMBLOCKS, 16); - recStack = (char*)malloc( RECSTACK_SIZE ); - - s_nInstCacheSize = 128; - s_pInstCache = (EEINST*)malloc( sizeof(EEINST) * s_nInstCacheSize ); - - if ( recBlocks == NULL || recRAM == NULL || recROM == NULL || recROM1 == NULL || recMem == NULL || recLUT == NULL ) { - SysMessage( _( "Error allocating memory" ) ); - return -1; - } - - for ( i = 0x0000; i < 0x0200; i++ ) - { - recLUT[ i + 0x0000 ] = (uptr)&recRAM[ i << 14 ]; - recLUT[ i + 0x2000 ] = (uptr)&recRAM[ i << 14 ]; - recLUT[ i + 0x3000 ] = (uptr)&recRAM[ i << 14 ]; - } - - for ( i = 0x0000; i < 0x0040; i++ ) - { - recLUT[ i + 0x1fc0 ] = (uptr)&recROM[ i << 14 ]; - recLUT[ i + 0x9fc0 ] = (uptr)&recROM[ i << 14 ]; - recLUT[ i + 0xbfc0 ] = (uptr)&recROM[ i << 14 ]; - } - - for ( i = 0x0000; i < 0x0004; i++ ) - { - recLUT[ i + 0x1e00 ] = (uptr)&recROM1[ i << 14 ]; - recLUT[ i + 0x9e00 ] = (uptr)&recROM1[ i << 14 ]; - recLUT[ i + 0xbe00 ] = (uptr)&recROM1[ i << 14 ]; - } - - memcpy( recLUT + 0x8000, recLUT, 0x2000 * sizeof(uptr) ); - memcpy( recLUT + 0xa000, recLUT, 0x2000 * sizeof(uptr) ); - - memset(recMem, 0xcd, REC_CACHEMEM); - memset(recStack, 0, RECSTACK_SIZE); - - // SSE3 detection, manually create the code - x86SetPtr(recMem); - SSE3_MOVSLDUP_XMM_to_XMM(XMM0, XMM0); - RET(); - cpudetectSSE3(recMem); - - SysPrintf( "x86Init: \n" ); - SysPrintf( "\tCPU vender name = %s\n", cpuinfo.x86ID ); - SysPrintf( "\tFamilyID = %x\n", cpuinfo.x86StepID ); - SysPrintf( "\tx86Family = %s\n", cpuinfo.x86Fam ); - SysPrintf( "\tCPU speed = %d.%03d Ghz\n", cpuinfo.cpuspeed / 1000, cpuinfo.cpuspeed%1000); - SysPrintf( "\tx86PType = %s\n", cpuinfo.x86Type ); - SysPrintf( "\tx86Flags = %8.8x\n", cpuinfo.x86Flags ); - SysPrintf( "\tx86EFlags = %8.8x\n", cpuinfo.x86EFlags ); - SysPrintf( "Features: \n" ); - SysPrintf( "\t%sDetected MMX\n", cpucaps.hasMultimediaExtensions ? "" : "Not " ); - SysPrintf( "\t%sDetected SSE\n", cpucaps.hasStreamingSIMDExtensions ? "" : "Not " ); - SysPrintf( "\t%sDetected SSE2\n", cpucaps.hasStreamingSIMD2Extensions ? "" : "Not " ); - SysPrintf( "\t%sDetected SSE3\n", cpucaps.hasStreamingSIMD3Extensions ? "" : "Not " ); - - if ( cpuinfo.x86ID[0] == 'A' ) //AMD cpu - { - SysPrintf( " Extented AMD Features: \n" ); - SysPrintf( "\t%sDetected MMX2\n", cpucaps.hasMultimediaExtensionsExt ? "" : "Not " ); - SysPrintf( "\t%sDetected 3DNOW\n", cpucaps.has3DNOWInstructionExtensions ? "" : "Not " ); - SysPrintf( "\t%sDetected 3DNOW2\n", cpucaps.has3DNOWInstructionExtensionsExt ? "" : "Not " ); - } - if ( !( cpucaps.hasMultimediaExtensions ) ) - { - SysMessage( _( "Processor doesn't supports MMX, can't run recompiler without that" ) ); - return -1; - } - - SuperVUInit(-1); - - for(i = 0; i < 256; ++i) { - g_MACFlagTransform[i] = macarr[i>>4]|(macarr[i&15]<<4); - } - - SetCPUState(g_sseMXCSR, g_sseVUMXCSR); - - return 0; -} - -//////////////////////////////////////////////////// -void recReset( void ) { -#ifdef PCSX2_DEVBUILD - SysPrintf("EE Recompiler data reset\n"); -#endif - - s_nNextBlock = 0; - maxrecmem = 0; - memset( recRAM, 0, sizeof(BASEBLOCK)/4*0x02000000 ); - memset( recROM, 0, sizeof(BASEBLOCK)/4*0x00400000 ); - memset( recROM1, 0, sizeof(BASEBLOCK)/4*0x00040000 ); - memset( recBlocks, 0, sizeof(BASEBLOCKEX)*EE_NUMBLOCKS ); - if( s_pInstCache ) memset( s_pInstCache, 0, sizeof(EEINST)*s_nInstCacheSize ); - ResetBaseBlockEx(0); - -#ifdef _DEBUG - // don't clear since save states won't work - //memset(recMem, 0xcd, REC_CACHEMEM); -#endif - - recPtr = recMem; - recStackPtr = recStack; - iCWstate = 0; - - branch = 0; -} - -void recShutdown( void ) -{ - if ( recMem == NULL ) { - return; - } - - _aligned_free( recLUT ); - SysMunmap((uptr)recMem, REC_CACHEMEM); recMem = NULL; - _aligned_free( recRAM ); recRAM = NULL; - _aligned_free( recROM ); recROM = NULL; - _aligned_free( recROM1 ); recROM1 = NULL; - _aligned_free( recBlocks ); recBlocks = NULL; - free( s_pInstCache ); s_pInstCache = NULL; s_nInstCacheSize = 0; - - SuperVUDestroy(-1); - - x86Shutdown( ); -} - -void recEnableVU0micro(int enable) { -} - -void recEnableVU1micro(int enable) { -} - -void R5900Execute(); - -void recStep( void ) { -} - -void recExecute( void ) { - //SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST); - //SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);//ABOVE_NORMAL_PRIORITY_CLASS); - //SetThreadAffinityMask(GetCurrentThread(), 0); - if( Config.Options & PCSX2_EEREC ) Config.Options |= PCSX2_COP2REC; - - for (;;) - R5900Execute(); -} - -void recExecuteBlock( void ) { - R5900Execute(); -} - -//////////////////////////////////////////////////// -extern u32 g_nextBranchCycle; - -u32 g_lastpc = 0; -u32 g_EEDispatchTemp; -u32 s_pCurBlock_ltime; - -extern void Dispatcher(); -extern void DispatcherClear(); -extern void DispatcherReg(); -extern void _StartPerfCounter(); -extern void _StopPerfCounter(); - -//////////////////////////////////////////////////// -void recClear64(BASEBLOCK* p) -{ - int left = 4 - ((uptr)p % 16)/sizeof(BASEBLOCK); - recClearMem(p); - - if( left > 1 && *(u32*)(p+1) ) recClearMem(p+1); -} - -void recClear128(BASEBLOCK* p) -{ - int left = 4 - ((uptr)p % 32)/sizeof(BASEBLOCK); - recClearMem(p); - - if( left > 1 && *(u32*)(p+1) ) recClearMem(p+1); - if( left > 2 && *(u32*)(p+2) ) recClearMem(p+2); - if( left > 3 && *(u32*)(p+3) ) recClearMem(p+3); -} - -void recClear( u32 Addr, u32 Size ) -{ - u32 i; - for(i = 0; i < Size; ++i, Addr+=4) { - REC_CLEARM(Addr); - } -} - -#define EE_MIN_BLOCK_BYTES 16 - -void recClearMem(BASEBLOCK* p) -{ - BASEBLOCKEX* pexblock; - BASEBLOCK* pstart; - int lastdelay; - - assert( p != NULL ); - - if( p->uType & BLOCKTYPE_DELAYSLOT ) { - recClearMem(p-1); - if( p->pFnptr == 0 ) - return; - } - - assert( p->pFnptr != 0 ); - assert( p->startpc ); - - x86Ptr = (s8*)p->pFnptr; - - // there is a small problem: mem can be ored with 0xa<<28 or 0x8<<28, and don't know which - MOV32ItoR(EDX, p->startpc); - assert( (uptr)x86Ptr <= 0xffffffff ); - MOV32ItoR(R15, (uptr)x86Ptr); // will be replaced by JMP32 - JMP32((uptr)DispatcherClear - ( (uptr)x86Ptr + 5 )); - assert( x86Ptr == (s8*)p->pFnptr + EE_MIN_BLOCK_BYTES ); - - pstart = PC_GETBLOCK(p->startpc); - pexblock = PC_GETBLOCKEX(pstart); - assert( pexblock->startpc == pstart->startpc ); - -// if( pexblock->pOldFnptr ) { -// // have to mod oldfnptr too -// x86Ptr = pexblock->pOldFnptr; -// -// MOV32ItoR(EDX, p->startpc); -// JMP32((u32)DispatcherClear - ( (u32)x86Ptr + 5 )); -// } -// else -// pexblock->pOldFnptr = (u8*)p->pFnptr; - - // don't delete if last is delay - lastdelay = pexblock->size; - if( pstart[pexblock->size-1].uType & BLOCKTYPE_DELAYSLOT ) { - assert( pstart[pexblock->size-1].pFnptr != pstart->pFnptr ); - if( pstart[pexblock->size-1].pFnptr != 0 ) { - pstart[pexblock->size-1].uType = 0; - --lastdelay; - } - } - - memset(pstart, 0, lastdelay*sizeof(BASEBLOCK)); - - RemoveBaseBlockEx(pexblock, 0); - pexblock->size = 0; - pexblock->startpc = 0; -} - -// check for end of bios -void CheckForBIOSEnd() -{ - MOV32MtoR(EAX, (uptr)&cpuRegs.pc); - - CMP32ItoR(EAX, 0x00200008); - j8Ptr[0] = JE8(0); - - CMP32ItoR(EAX, 0x00100008); - j8Ptr[1] = JE8(0); - - // return - j8Ptr[2] = JMP8(0); - - x86SetJ8( j8Ptr[0] ); - x86SetJ8( j8Ptr[1] ); - - // bios end - if( REC_INC_STACK ) - ADD64ItoR(RSP, REC_INC_STACK); - RET2(); - - x86SetJ8( j8Ptr[2] ); -} - -static int *s_pCode; - -void SetBranchReg( u32 reg ) -{ - branch = 1; - - if( reg != 0xffffffff ) { -// if( GPR_IS_CONST1(reg) ) -// MOV32ItoM( (uptr)&cpuRegs.pc, g_cpuConstRegs[reg].UL[0] ); -// else { -// int mmreg; -// -// if( (mmreg = _checkXMMreg(XMMTYPE_GPRREG, reg, MODE_READ)) >= 0 ) { -// SSE_MOVSS_XMM_to_M32((uptr)&cpuRegs.pc, mmreg); -// } -// else { -// MOV32MtoR(EAX, (uptr)&cpuRegs.GPR.r[ reg ].UL[ 0 ] ); -// MOV32RtoM((uptr)&cpuRegs.pc, EAX); -// } -// } - _allocX86reg(ESI, X86TYPE_PCWRITEBACK, 0, MODE_WRITE); - _eeMoveGPRtoR(ESI, reg); - - recompileNextInstruction(1); - - if( x86regs[ESI].inuse ) { - assert( x86regs[ESI].type == X86TYPE_PCWRITEBACK ); - MOV32RtoM((uptr)&cpuRegs.pc, ESI); - x86regs[ESI].inuse = 0; - } - else { - MOV32MtoR(EAX, (uptr)&g_recWriteback); - MOV32RtoM((uptr)&cpuRegs.pc, EAX); - } - } - -// CMP32ItoM((uptr)&cpuRegs.pc, 0); -// j8Ptr[5] = JNE8(0); -// CALLFunc((uptr)tempfn); -// x86SetJ8( j8Ptr[5] ); - - iFlushCall(FLUSH_EVERYTHING); - - iBranchTest(0xffffffff, 1); - if( bExecBIOS ) CheckForBIOSEnd(); - - JMP32((uptr)DispatcherReg - ( (uptr)x86Ptr + 5 )); -} - -void SetBranchImm( u32 imm ) -{ - u32* ptr; - branch = 1; - - assert( imm ); - - // end the current block - MOV32ItoM( (uptr)&cpuRegs.pc, imm ); - iFlushCall(FLUSH_EVERYTHING); - - iBranchTest(imm, imm <= pc); - if( bExecBIOS ) CheckForBIOSEnd(); - - MOV32ItoR(EDX, 0); - ptr = (u32*)(x86Ptr-4); - *ptr = (u32)JMP32((uptr)Dispatcher - ( (uptr)x86Ptr + 5 )); -} - -void SaveBranchState() -{ - s_savex86FpuState = x86FpuState; - s_saveiCWstate = iCWstate; - s_savenBlockCycles = s_nBlockCycles; - s_saveConstGPRreg = 0xffffffff; // indicate searching - s_saveHasConstReg = g_cpuHasConstReg; - s_saveFlushedConstReg = g_cpuFlushedConstReg; - s_psaveInstInfo = g_pCurInstInfo; - s_saveRegHasLive1 = g_cpuRegHasLive1; - s_saveRegHasSignExt = g_cpuRegHasSignExt; - - // save all mmx regs - memcpy(s_saveXMMregs, xmmregs, sizeof(xmmregs)); - memcpy(s_saveX86regs, x86regs, sizeof(x86regs)); -} - -void LoadBranchState() -{ - x86FpuState = s_savex86FpuState; - iCWstate = s_saveiCWstate; - s_nBlockCycles = s_savenBlockCycles; - - if( s_saveConstGPRreg != 0xffffffff ) { - assert( s_saveConstGPRreg > 0 ); - - // make sure right GPR was saved - assert( g_cpuHasConstReg == s_saveHasConstReg || (g_cpuHasConstReg ^ s_saveHasConstReg) == (1<ltime); - CALLFunc((uptr)_StopPerfCounter); - } -#endif -} - -#define USE_FAST_BRANCHES 0 - -//void testfpu() -//{ -// int i; -// for(i = 0; i < 32; ++i ) { -// if( fpuRegs.fpr[i].UL== 0x7f800000 || fpuRegs.fpr[i].UL == 0xffc00000) { -// SysPrintf("bad fpu: %x %x %x\n", i, cpuRegs.cycle, g_lastpc); -// } -// -// if( VU0.VF[i].UL[0] == 0xffc00000 || //(VU0.VF[i].UL[1]&0xffc00000) == 0xffc00000 || -// VU0.VF[i].UL[0] == 0x7f800000) { -// SysPrintf("bad vu0: %x %x %x\n", i, cpuRegs.cycle, g_lastpc); -// } -// } -//} - -//static void cleanup() -//{ -// assert( !g_globalXMMSaved ); -//} - -static void iBranchTest(u32 newpc, u32 cpuBranch) -{ -#ifdef PCSX2_DEVBUILD - if( s_startcount ) { - StopPerfCounter(); - ADD32ItoM( (uptr)&s_pCurBlockEx->visited, 1 ); - } -#endif - -#ifdef _DEBUG - //CALLFunc((uptr)testfpu); -#endif - - if( !USE_FAST_BRANCHES || cpuBranch ) { - MOV32MtoR(ECX, (uptr)&cpuRegs.cycle); - ADD32ItoR(ECX, s_nBlockCycles*9/8); // NOTE: mulitply cycles here, 6/5 ratio stops pal ffx from randomly crashing, but crashes jakI - MOV32RtoM((uptr)&cpuRegs.cycle, ECX); // update cycles - } - else { - ADD32ItoM((uptr)&cpuRegs.cycle, s_nBlockCycles*9/8); - return; - } - - SUB32MtoR(ECX, (uptr)&g_nextBranchCycle); - - // check if should branch - j8Ptr[0] = JS8( 0 ); - - // has to be in the middle of Save/LoadBranchState - CALLFunc( (int)cpuBranchTest ); - - if( newpc != 0xffffffff ) { - CMP32ItoM((uptr)&cpuRegs.pc, newpc); - JNE32((uptr)DispatcherReg - ( (uptr)x86Ptr + 6 )); - } - - x86SetJ8( j8Ptr[0] ); -} - - -//////////////////////////////////////////////////// -#ifndef CP2_RECOMPILE - -REC_SYS(COP2); - -#else - -void recCOP2( void ) -{ -#ifdef CPU_LOG - CPU_LOG( "Recompiling COP2:%s\n", disR5900Fasm( cpuRegs.code, cpuRegs.pc ) ); -#endif - - if ( !cpucaps.hasStreamingSIMDExtensions ) { - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - iFlushCall(FLUSH_EVERYTHING); - g_cpuHasConstReg = 1; // reset all since COP2 can change regs - CALLFunc( (u32)COP2 ); - - CMP32ItoM((uptr)&cpuRegs.pc, pc); - j8Ptr[0] = JE8(0); - ADD32ItoM((uptr)&cpuRegs.cycle, s_nBlockCycles); - JMP32((uptr)DispatcherReg - ( (uptr)x86Ptr + 5 )); - x86SetJ8(j8Ptr[0]); - } - else - { - recCOP22( ); - } -} - -#endif - -//////////////////////////////////////////////////// -void recSYSCALL( void ) { - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - iFlushCall(FLUSH_NODESTROY); - CALLFunc( (u32)SYSCALL ); - - CMP32ItoM((uptr)&cpuRegs.pc, pc); - j8Ptr[0] = JE8(0); - ADD32ItoM((uptr)&cpuRegs.cycle, s_nBlockCycles); - JMP32((uptr)DispatcherReg - ( (uptr)x86Ptr + 5 )); - x86SetJ8(j8Ptr[0]); - //branch = 2; -} - -//////////////////////////////////////////////////// -void recBREAK( void ) { - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - iFlushCall(FLUSH_EVERYTHING); - CALLFunc( (u32)BREAK ); - - CMP32ItoM((uptr)&cpuRegs.pc, pc); - j8Ptr[0] = JE8(0); - ADD32ItoM((uptr)&cpuRegs.cycle, s_nBlockCycles); - - if( REC_INC_STACK ) - ADD64ItoR(RSP, REC_INC_STACK); - RET(); - x86SetJ8(j8Ptr[0]); - //branch = 2; -} - -//////////////////////////////////////////////////// -//static void recCACHE( void ) { -// MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); -// MOV32ItoM( (uptr)&cpuRegs.pc, pc ); -// iFlushCall(FLUSH_EVERYTHING); -// CALLFunc( (u32)CACHE ); -// //branch = 2; -// -// CMP32ItoM((uptr)&cpuRegs.pc, pc); -// j8Ptr[0] = JE8(0); -// RET(); -// x86SetJ8(j8Ptr[0]); -//} - - -void recPREF( void ) -{ -} - -void recSYNC( void ) -{ -} - -void recMFSA( void ) -{ - int mmreg; - if (!_Rd_) return; - - if( (mmreg = _checkXMMreg(XMMTYPE_GPRREG, _Rd_, MODE_WRITE)) >= 0 ) { - SSE_MOVLPS_M64_to_XMM(mmreg, (uptr)&cpuRegs.sa); - } - else { - MOV64MtoR(RAX, (uptr)&cpuRegs.sa); - _deleteEEreg(_Rd_, 0); - MOV64RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], RAX); - } - //else { - // mmreg = _allocX86reg(-1, X86TYPE_GPR, _Rd_, MODE_WRITE); - // MOV64MtoR(mmreg, (uptr)&cpuRegs.sa); - //} -} - -void recMTSA( void ) -{ - if( GPR_IS_CONST1(_Rs_) ) { - MOV32ItoM((uptr)&cpuRegs.sa, g_cpuConstRegs[_Rs_].UL[0] ); - } - else { - int mmreg; - - if( (mmreg = _checkXMMreg(XMMTYPE_GPRREG, _Rs_, MODE_READ)) >= 0 ) { - SSE_MOVSS_XMM_to_M32((uptr)&cpuRegs.sa, mmreg); - } - else { - MOV32MtoR(EAX, (uptr)&cpuRegs.GPR.r[_Rs_].UL[0]); - MOV32RtoM((uptr)&cpuRegs.sa, EAX); - } - } -} - -void recMTSAB( void ) -{ - if( GPR_IS_CONST1(_Rs_) ) { - MOV32ItoM((uptr)&cpuRegs.sa, ((g_cpuConstRegs[_Rs_].UL[0] & 0xF) ^ (_Imm_ & 0xF)) << 3); - } - else { - _eeMoveGPRtoR(EAX, _Rs_); - AND32ItoR(EAX, 0xF); - XOR32ItoR(EAX, _Imm_&0xf); - SHL32ItoR(EAX, 3); - MOV32RtoM((uptr)&cpuRegs.sa, EAX); - } -} - -void recMTSAH( void ) -{ - if( GPR_IS_CONST1(_Rs_) ) { - MOV32ItoM((uptr)&cpuRegs.sa, ((g_cpuConstRegs[_Rs_].UL[0] & 0x7) ^ (_Imm_ & 0x7)) << 4); - } - else { - _eeMoveGPRtoR(EAX, _Rs_); - AND32ItoR(EAX, 0x7); - XOR32RtoR(EAX, _Imm_&0x7); - SHL32ItoR(EAX, 4); - MOV32RtoM((uptr)&cpuRegs.sa, EAX); - } -} - -#if !defined(_MSC_VER) -static void checkcodefn() -{ - int pctemp; - - __asm__("movl %%eax, %0" : "=m"(pctemp) ); - - SysPrintf("code changed! %x\n", pctemp); - assert(0); -} -#endif - -void checkpchanged(u32 startpc) -{ - assert(0); -} - -//#ifdef _DEBUG -//#define CHECK_XMMCHANGED() CALLFunc((uptr)checkxmmchanged); -//#else -//#define CHECK_XMMCHANGED() -//#endif -// -//static void checkxmmchanged() -//{ -// assert( !g_globalXMMSaved ); -//} - -u32 recompileCodeSafe(u32 temppc) -{ - BASEBLOCK* pblock = PC_GETBLOCK(temppc); - - if( pblock->pFnptr != 0 && pblock->startpc != s_pCurBlock->startpc ) { - if( pc == pblock->startpc ) - return 0; - } - - return 1; -} - -void recompileNextInstruction(int delayslot) -{ - static u8 s_bFlushReg = 1; - int i, count; - - BASEBLOCK* pblock = PC_GETBLOCK(pc); - - // need *ppblock != s_pCurBlock because of branches - if( pblock->pFnptr != 0 && pblock->startpc != s_pCurBlock->startpc ) { - - if( !delayslot && pc == pblock->startpc ) { - // code already in place, so jump to it and exit recomp - assert( PC_GETBLOCKEX(pblock)->startpc == pblock->startpc ); - - iFlushCall(FLUSH_EVERYTHING); - MOV32ItoM((uptr)&cpuRegs.pc, pc); - -// if( pexblock->pOldFnptr ) { -// // code already in place, so jump to it and exit recomp -// JMP32((u32)pexblock->pOldFnptr - ((u32)x86Ptr + 5)); -// branch = 3; -// return; -// } - - JMP32((uptr)pblock->pFnptr - ((uptr)x86Ptr + 5)); - branch = 3; - return; - } - else { - - if( !(delayslot && pblock->startpc == pc) ) { - s8* oldX86 = x86Ptr; - //__Log("clear block %x\n", pblock->startpc); - recClearMem(pblock); - x86Ptr = oldX86; - if( delayslot ) - SysPrintf("delay slot %x\n", pc); - } - } - } - - if( delayslot ) - pblock->uType = BLOCKTYPE_DELAYSLOT; - - s_pCode = (int *)PSM( pc ); - assert(s_pCode); - -#ifdef _DEBUG - MOV32ItoR(EAX, pc); -#endif - - cpuRegs.code = *(int *)s_pCode; - s_nBlockCycles++; - pc += 4; - -//#ifdef _DEBUG -// CMP32ItoM((u32)s_pCode, cpuRegs.code); -// j8Ptr[0] = JE8(0); -// MOV32ItoR(EAX, pc); -// CALLFunc((uptr)checkcodefn); -// x86SetJ8( j8Ptr[ 0 ] ); -// -// if( !delayslot ) { -// CMP32ItoM((uptr)&cpuRegs.pc, s_pCurBlockEx->startpc); -// j8Ptr[0] = JB8(0); -// CMP32ItoM((uptr)&cpuRegs.pc, pc); -// j8Ptr[1] = JA8(0); -// j8Ptr[2] = JMP8(0); -// x86SetJ8( j8Ptr[ 0 ] ); -// x86SetJ8( j8Ptr[ 1 ] ); -// PUSH32I(s_pCurBlockEx->startpc); -// CALLFunc((uptr)checkpchanged); -// ADD32ItoR(ESP, 4); -// x86SetJ8( j8Ptr[ 2 ] ); -// } -//#endif - - g_pCurInstInfo++; - - // reorder register priorities - for(i = 0; i < X86REGS; ++i) { - if( x86regs[i].inuse ) { - if( x86regs[i].type == X86TYPE_GPR ) { - count = _recIsRegWritten(g_pCurInstInfo, (s_nEndBlock-pc)/4 + 1, XMMTYPE_GPRREG, x86regs[i].reg); - if( count > 0 ) x86regs[i].counter = 1000-count; - else x86regs[i].counter = 0; - } - else x86regs[i].counter = 0; - } - } - - for(i = 0; i < XMMREGS; ++i) { - if( xmmregs[i].inuse ) { - count = _recIsRegWritten(g_pCurInstInfo, (s_nEndBlock-pc)/4 + 1, xmmregs[i].type, xmmregs[i].reg); - if( count > 0 ) xmmregs[i].counter = 1000-count; - else xmmregs[i].counter = 0; - } - } - - // peephole optimizations - if( g_pCurInstInfo->info & EEINSTINFO_COREC ) { - -#ifdef PCSX2_VIRTUAL_MEM - if( g_pCurInstInfo->numpeeps > 1 ) { - switch(cpuRegs.code>>26) { - case 30: recLQ_coX(g_pCurInstInfo->numpeeps); break; - case 31: recSQ_coX(g_pCurInstInfo->numpeeps); break; - case 49: recLWC1_coX(g_pCurInstInfo->numpeeps); break; - case 57: recSWC1_coX(g_pCurInstInfo->numpeeps); break; - case 55: recLD_coX(g_pCurInstInfo->numpeeps); break; - case 63: recSD_coX(g_pCurInstInfo->numpeeps); break; - default: - assert(0); - } - - pc += g_pCurInstInfo->numpeeps*4; - s_nBlockCycles += g_pCurInstInfo->numpeeps; - g_pCurInstInfo += g_pCurInstInfo->numpeeps; - } - else { - recBSC_co[cpuRegs.code>>26](); - pc += 4; - s_nBlockCycles++; - g_pCurInstInfo++; - } -#else - assert(0); -#endif - } - else { - assert( !(g_pCurInstInfo->info & EEINSTINFO_NOREC) ); - - // if this instruction is a jump or a branch, exit right away - if( delayslot ) { - switch(cpuRegs.code>>26) { - case 1: - switch(_Rt_) { - case 0: case 1: case 2: case 3: case 0x10: case 0x11: case 0x12: case 0x13: - SysPrintf("branch %x in delay slot!\n", cpuRegs.code); - _clearNeededX86regs(); - _clearNeededXMMregs(); - return; - } - break; - - case 2: case 3: case 4: case 5: case 6: case 7: case 0x14: case 0x15: case 0x16: case 0x17: - SysPrintf("branch %x in delay slot!\n", cpuRegs.code); - _clearNeededX86regs(); - _clearNeededXMMregs(); - return; - } - } - recBSC[ cpuRegs.code >> 26 ](); - } - - if( !delayslot ) { - if( s_bFlushReg ) { - //if( !_flushUnusedConstReg() ) { - int flushed = 0; - if( !flushed && _getNumXMMwrite() > 2 ) _flushXMMunused(); - s_bFlushReg = !flushed; -// } -// else s_bFlushReg = 0; - } - else s_bFlushReg = 1; - } - else s_bFlushReg = 1; - - //CHECK_XMMCHANGED(); - _clearNeededX86regs(); - _clearNeededXMMregs(); - - // for now - _freeXMMregs(); - _flushCachedRegs(); - g_cpuHasConstReg = 0; -} - -//////////////////////////////////////////////////// -#include "R3000A.h" -#include "PsxCounters.h" -#include "PsxMem.h" -extern tIPU_BP g_BP; - -extern u32 psxdump; -extern u32 psxNextCounter, psxNextsCounter; -extern void iDumpPsxRegisters(u32 startpc, u32 temp); -extern Counter counters[6]; - -void iDumpRegisters(u32 startpc, u32 temp) -{ - int i; - char* pstr = temp ? "t" : ""; - const u32 dmacs[] = {0x8000, 0x9000, 0xa000, 0xb000, 0xb400, 0xc000, 0xc400, 0xc800, 0xd000, 0xd400 }; - extern char *disRNameGPR[]; - - __Log("%sreg: %x %x\n", pstr, startpc, cpuRegs.interrupt); - for(i = 1; i < 32; ++i) __Log("%s: %x_%x_%x_%x\n", disRNameGPR[i], cpuRegs.GPR.r[i].UL[3], cpuRegs.GPR.r[i].UL[2], cpuRegs.GPR.r[i].UL[1], cpuRegs.GPR.r[i].UL[0]); - //for(i = 0; i < 32; ++i) __Log("%sf%d: %f %x\n", pstr, i, fpuRegs.fpr[i].f, fpuRegs.fprc[i]); - //for(i = 1; i < 32; ++i) __Log("%svf%d: %f %f %f %f, vi: %x\n", pstr, i, VU0.VF[i].F[3], VU0.VF[i].F[2], VU0.VF[i].F[1], VU0.VF[i].F[0], VU0.VI[i].UL); - for(i = 0; i < 32; ++i) __Log("%sf%d: %x %x\n", pstr, i, fpuRegs.fpr[i].UL, fpuRegs.fprc[i]); - for(i = 1; i < 32; ++i) __Log("%svf%d: %x %x %x %x, vi: %x\n", pstr, i, VU0.VF[i].UL[3], VU0.VF[i].UL[2], VU0.VF[i].UL[1], VU0.VF[i].UL[0], VU0.VI[i].UL); - __Log("%svfACC: %x %x %x %x\n", pstr, VU0.ACC.UL[3], VU0.ACC.UL[2], VU0.ACC.UL[1], VU0.ACC.UL[0]); - __Log("%sLO: %x_%x_%x_%x, HI: %x_%x_%x_%x\n", pstr, cpuRegs.LO.UL[3], cpuRegs.LO.UL[2], cpuRegs.LO.UL[1], cpuRegs.LO.UL[0], - cpuRegs.HI.UL[3], cpuRegs.HI.UL[2], cpuRegs.HI.UL[1], cpuRegs.HI.UL[0]); - __Log("%sCycle: %x %x, Count: %x\n", pstr, cpuRegs.cycle, g_nextBranchCycle, cpuRegs.CP0.n.Count); - iDumpPsxRegisters(psxRegs.pc, temp); - - __Log("cyc11: %x %x; vu0: %x, vu1: %x\n", cpuRegs.sCycle[1], cpuRegs.eCycle[1], VU0.cycle, VU1.cycle); - - __Log("%scounters: %x %x; psx: %x %x\n", pstr, nextsCounter, nextCounter, psxNextsCounter, psxNextCounter); - for(i = 0; i < 4; ++i) { - __Log("eetimer%d: count: %x mode: %x target: %x %x; %x %x; %x %x %x %x\n", i, - counters[i].count, counters[i].mode, counters[i].target, counters[i].hold, counters[i].rate, - counters[i].interrupt, counters[i].Cycle, counters[i].sCycle, counters[i].CycleT, counters[i].sCycleT); - } - __Log("VIF0_STAT = %x, VIF1_STAT = %x\n", psHu32(0x3800), psHu32(0x3C00)); - __Log("ipu %x %x %x %x; bp: %x %x %x %x\n", psHu32(0x2000), psHu32(0x2010), psHu32(0x2020), psHu32(0x2030), g_BP.BP, g_BP.bufferhasnew, g_BP.FP, g_BP.IFC); - __Log("gif: %x %x %x\n", psHu32(0x3000), psHu32(0x3010), psHu32(0x3020)); - for(i = 0; i < ARRAYSIZE(dmacs); ++i) { - DMACh* p = (DMACh*)(PS2MEM_HW+dmacs[i]); - __Log("dma%d c%x m%x q%x t%x s%x\n", i, p->chcr, p->madr, p->qwc, p->tadr, p->sadr); - } - __Log("dmac %x %x %x %x\n", psHu32(DMAC_CTRL), psHu32(DMAC_STAT), psHu32(DMAC_RBSR), psHu32(DMAC_RBOR)); - __Log("intc %x %x\n", psHu32(INTC_STAT), psHu32(INTC_MASK)); - __Log("sif: %x %x %x %x %x\n", psHu32(0xf200), psHu32(0xf220), psHu32(0xf230), psHu32(0xf240), psHu32(0xf260)); -} - -extern u32 psxdump; - -static void printfn() -{ - static int lastrec = 0; - static int curcount = 0, count2 = 0; - const int skip = 0; - static int i; - - assert( !g_globalXMMSaved ); - -#ifdef _DEBUG - //__asm stmxcsr i - //assert( i = g_sseMXCSR ); -#endif - - if( (dumplog&2) ) {//&& lastrec != g_lastpc ) { - - curcount++; - - if( curcount > skip ) { - iDumpRegisters(g_lastpc, 1); - curcount = 0; - } - - lastrec = g_lastpc; - } -} - -u32 s_recblocks[] = {0}; - -void badespfn() { - assert(0); - SysPrintf("Bad esp!\n"); -} - -#define OPTIMIZE_COP2 0//CHECK_VU0REC - -void recRecompile( u32 startpc ) -{ - u32 i = 0; - u32 branchTo; - u32 willbranch3 = 0; - u32* ptr; - u32 usecop2; - -#ifdef _DEBUG - //dumplog |= 4; - if( dumplog & 4 ) - iDumpRegisters(startpc, 0); -#endif - - assert( startpc ); - - // if recPtr reached the mem limit reset whole mem - if ( ( (uptr)recPtr - (uptr)recMem ) >= REC_CACHEMEM-0x40000 || dumplog == 0xffffffff) { - recReset(); - } - if ( ( (uptr)recStackPtr - (uptr)recStack ) >= RECSTACK_SIZE-0x100 ) { -#ifdef _DEBUG - SysPrintf("stack reset\n"); -#endif - recReset(); - } - - s_pCurBlock = PC_GETBLOCK(startpc); - - if( s_pCurBlock->pFnptr ) { - // clear if already taken - assert( s_pCurBlock->startpc < startpc ); - recClearMem(s_pCurBlock); - } - - if( s_pCurBlock->startpc == startpc ) { - s_pCurBlockEx = PC_GETBLOCKEX(s_pCurBlock); - assert( s_pCurBlockEx->startpc == startpc ); - } - else { - s_pCurBlockEx = NULL; - for(i = 0; i < EE_NUMBLOCKS; ++i) { - if( recBlocks[(i+s_nNextBlock)%EE_NUMBLOCKS].size == 0 ) { - s_pCurBlockEx = recBlocks+(i+s_nNextBlock)%EE_NUMBLOCKS; - s_nNextBlock = (i+s_nNextBlock+1)%EE_NUMBLOCKS; - break; - } - } - - if( s_pCurBlockEx == NULL ) { - //SysPrintf("ee reset (blocks)\n"); - recReset(); - s_nNextBlock = 0; - s_pCurBlockEx = recBlocks; - } - - s_pCurBlockEx->startpc = startpc; - } - - x86SetPtr( recPtr ); - x86Align(16); - recPtr = x86Ptr; - - assert( (uptr)x86Ptr <= 0xffffffff ); - s_pCurBlock->pFnptr = (u32)x86Ptr; - s_pCurBlock->startpc = startpc; - - branch = 0; - - // reset recomp state variables - s_nBlockCycles = 0; - pc = startpc; - iCWstate = 0; - s_saveConstGPRreg = 0; - g_cpuHasConstReg = g_cpuFlushedConstReg = 1; - g_cpuPrevRegHasLive1 = g_cpuRegHasLive1 = 0xffffffff; - g_cpuPrevRegHasSignExt = g_cpuRegHasSignExt = 0; - _recClearWritebacks(); - assert( g_cpuConstRegs[0].UD[0] == 0 ); - - _initX86regs(); - _initXMMregs(); - -#ifdef _DEBUG - //CMP64MtoR(RSP, (uptr)&s_uSaveESP); - //j8Ptr[0] = JE8(0); - //CALLFunc((uptr)badespfn); - //x86SetJ8(j8Ptr[0]); - - // for debugging purposes - MOV32ItoM((uptr)&g_lastpc, pc); - CALLFunc((uptr)printfn); -#endif - - // go until the next branch - i = startpc; - s_nEndBlock = 0xffffffff; - s_nHasDelay = 0; - - while(1) { - BASEBLOCK* pblock = PC_GETBLOCK(i); - if( pblock->pFnptr != 0 && pblock->startpc != s_pCurBlock->startpc ) { - - if( i == pblock->startpc ) { - // branch = 3 - willbranch3 = 1; - s_nEndBlock = i; - break; - } - } - - cpuRegs.code = *(int *)PSM(i); - - switch(cpuRegs.code >> 26) { - case 0: // special - - if( _Funct_ == 8 || _Funct_ == 9 ) { // JR, JALR - s_nEndBlock = i + 8; - s_nHasDelay = 1; - goto StartRecomp; - } - - break; - case 1: // regimm - - if( _Rt_ < 4 || (_Rt_ >= 16 && _Rt_ < 20) ) { - // branches - if( _Rt_ == 2 && _Rt_ == 3 && _Rt_ == 18 && _Rt_ == 19 ) s_nHasDelay = 1; - else s_nHasDelay = 2; - - branchTo = _Imm_ * 4 + i + 4; - if( branchTo > startpc && branchTo < i ) s_nEndBlock = branchTo; - else s_nEndBlock = i+8; - - goto StartRecomp; - } - - break; - - case 2: // J - case 3: // JAL - s_nHasDelay = 1; - s_nEndBlock = i + 8; - goto StartRecomp; - - // branches - case 4: case 5: case 6: case 7: - case 20: case 21: case 22: case 23: - - if( (cpuRegs.code >> 26) >= 20 ) s_nHasDelay = 1; - else s_nHasDelay = 2; - - branchTo = _Imm_ * 4 + i + 4; - if( branchTo > startpc && branchTo < i ) s_nEndBlock = branchTo; - else s_nEndBlock = i+8; - - goto StartRecomp; - - case 16: // cp0 - if( _Rs_ == 16 ) { - if( _Funct_ == 24 ) { // eret - s_nEndBlock = i+4; - goto StartRecomp; - } - } - - break; - case 17: // cp1 - case 18: // cp2 - if( _Rs_ == 8 ) { - // BC1F, BC1T, BC1FL, BC1TL - // BC2F, BC2T, BC2FL, BC2TL - if( _Rt_ >= 2 ) s_nHasDelay = 1; - else s_nHasDelay = 2; - - branchTo = _Imm_ * 4 + i + 4; - if( branchTo > startpc && branchTo < i ) s_nEndBlock = branchTo; - else s_nEndBlock = i+8; - - goto StartRecomp; - } - break; - } - - i += 4; - } - -StartRecomp: - - // rec info // - { - EEINST* pcur; - - if( s_nInstCacheSize < (s_nEndBlock-startpc)/4+1 ) { - free(s_pInstCache); - s_nInstCacheSize = (s_nEndBlock-startpc)/4+10; - s_pInstCache = (EEINST*)malloc(sizeof(EEINST)*s_nInstCacheSize); - assert( s_pInstCache != NULL ); - } - - pcur = s_pInstCache + (s_nEndBlock-startpc)/4; - _recClearInst(pcur); - pcur->info = 0; - - for(i = s_nEndBlock; i > startpc; i -= 4 ) { - cpuRegs.code = *(int *)PSM(i-4); - pcur[-1] = pcur[0]; - rpropBSC(pcur-1, pcur); - pcur--; - } - } - - // analyze instructions // - { - usecop2 = 0; - g_pCurInstInfo = s_pInstCache; - - for(i = startpc; i < s_nEndBlock; i += 4) { - g_pCurInstInfo++; - cpuRegs.code = *(u32*)PSM(i); - - // cop2 // - if( g_pCurInstInfo->info & EEINSTINFO_COP2 ) { - - if( !usecop2 ) { - // init - if( OPTIMIZE_COP2 ) { - memset(VU0.fmac,0,sizeof(VU0.fmac)); - memset(&VU0.fdiv,0,sizeof(VU0.fdiv)); - memset(&VU0.efu,0,sizeof(VU0.efu)); - } - vucycle = 0; - usecop2 = 1; - } - - VU0.code = cpuRegs.code; - _cop2AnalyzeOp(g_pCurInstInfo, OPTIMIZE_COP2); - continue; - } - - if( usecop2 ) vucycle++; - - // peephole optimizations // -#ifdef PCSX2_VIRTUAL_MEM - if( i < s_nEndBlock-4 && recompileCodeSafe(i) ) { - u32 curcode = cpuRegs.code; - u32 nextcode = *(u32*)PSM(i+4); - if( _eeIsLoadStoreCoIssue(curcode, nextcode) && recBSC_co[curcode>>26] != NULL ) { - - // rs has to be the same, and cannot be just written - if( ((curcode >> 21) & 0x1F) == ((nextcode >> 21) & 0x1F) && !_eeLoadWritesRs(curcode) ) { - - if( _eeIsLoadStoreCoX(curcode) && ((nextcode>>16)&0x1f) != ((curcode>>21)&0x1f) ) { - // see how many stores there are - u32 j; - // use xmmregs since only supporting lwc1,lq,swc1,sq - for(j = i+8; j < s_nEndBlock && j < i+4*XMMREGS; j += 4 ) { - u32 nncode = *(u32*)PSM(j); - if( (nncode>>26) != (curcode>>26) || ((curcode>>21)&0x1f) != ((nncode>>21)&0x1f) || - _eeLoadWritesRs(nncode)) - break; - } - - if( j > i+8 ) { - u32 num = (j-i)>>2; // number of stores that can coissue - assert( num <= XMMREGS ); - - g_pCurInstInfo[0].numpeeps = num-1; - g_pCurInstInfo[0].info |= EEINSTINFO_COREC; - - while(i < j-4) { - g_pCurInstInfo++; - g_pCurInstInfo[0].info |= EEINSTINFO_NOREC; - i += 4; - } - - continue; - } - - // fall through - } - - // unaligned loadstores - - // if LWL, check if LWR and that offsets are +3 away - switch(curcode >> 26) { - case 0x22: // LWL - if( (nextcode>>26) != 0x26 || ((s16)nextcode)+3 != (s16)curcode ) - continue; - break; - case 0x26: // LWR - if( (nextcode>>26) != 0x22 || ((s16)nextcode) != (s16)curcode+3 ) - continue; - break; - - case 0x2a: // SWL - if( (nextcode>>26) != 0x2e || ((s16)nextcode)+3 != (s16)curcode ) - continue; - break; - case 0x2e: // SWR - if( (nextcode>>26) != 0x2a || ((s16)nextcode) != (s16)curcode+3 ) - continue; - break; - - case 0x1a: // LDL - if( (nextcode>>26) != 0x1b || ((s16)nextcode)+7 != (s16)curcode ) - continue; - break; - case 0x1b: // LWR - if( (nextcode>>26) != 0x1aa || ((s16)nextcode) != (s16)curcode+7 ) - continue; - break; - - case 0x2c: // SWL - if( (nextcode>>26) != 0x2d || ((s16)nextcode)+7 != (s16)curcode ) - continue; - break; - case 0x2d: // SWR - if( (nextcode>>26) != 0x2c || ((s16)nextcode) != (s16)curcode+7 ) - continue; - break; - } - - // good enough - g_pCurInstInfo[0].info |= EEINSTINFO_COREC; - g_pCurInstInfo[0].numpeeps = 1; - g_pCurInstInfo[1].info |= EEINSTINFO_NOREC; - g_pCurInstInfo++; - i += 4; - continue; - } - } - } -#endif // end peephole - } - - if( usecop2 ) { - // add necessary mac writebacks - g_pCurInstInfo = s_pInstCache; - - for(i = startpc; i < s_nEndBlock-4; i += 4) { - g_pCurInstInfo++; - - if( g_pCurInstInfo->info & EEINSTINFO_COP2 ) { - } - } - } - } - - // perf counters // -#ifdef PCSX2_DEVBUILD - s_startcount = 0; -// if( pc+32 < s_nEndBlock ) { -// // only blocks with more than 8 insts -// //PUSH32I((uptr)&lbase); -// //CALLFunc((uptr)QueryPerformanceCounter); -// lbase.QuadPart = GetCPUTick(); -// s_startcount = 1; -// } -#endif - -#ifdef _DEBUG - // dump code - for(i = 0; i < ARRAYSIZE(s_recblocks); ++i) { - if( startpc == s_recblocks[i] ) { - iDumpBlock(startpc, recPtr); - } - } - - if( (dumplog & 1) ) //|| usecop2 ) - iDumpBlock(startpc, recPtr); -#endif - - // finally recompile // - g_pCurInstInfo = s_pInstCache; - while (!branch && pc < s_nEndBlock) { - recompileNextInstruction(0); - } - -#ifdef _DEBUG - if( (dumplog & 1) ) - iDumpBlock(startpc, recPtr); -#endif - - assert( (pc-startpc)>>2 <= 0xffff ); - s_pCurBlockEx->size = (pc-startpc)>>2; - - for(i = 1; i < (u32)s_pCurBlockEx->size-1; ++i) { - s_pCurBlock[i].pFnptr = s_pCurBlock->pFnptr; - s_pCurBlock[i].startpc = s_pCurBlock->startpc; - } - - // don't overwrite if delay slot - if( i < (u32)s_pCurBlockEx->size && !(s_pCurBlock[i].uType & BLOCKTYPE_DELAYSLOT) ) { - s_pCurBlock[i].pFnptr = s_pCurBlock->pFnptr; - s_pCurBlock[i].startpc = s_pCurBlock->startpc; - } - - // set the block ptr - AddBaseBlockEx(s_pCurBlockEx, 0); -// if( p[1].startpc == p[0].startpc + 4 ) { -// assert( p[1].pFnptr != 0 ); -// // already fn in place, so add to list -// AddBaseBlockEx(s_pCurBlockEx, 0); -// } -// else -// *(BASEBLOCKEX**)(p+1) = pex; -// } - - //PC_SETBLOCKEX(s_pCurBlock, s_pCurBlockEx); - - if( !(pc&0x10000000) ) - maxrecmem = max( (pc&~0xa0000000), maxrecmem ); - - if( branch == 2 ) { - iFlushCall(FLUSH_EVERYTHING); - - iBranchTest(0xffffffff, 1); - if( bExecBIOS ) CheckForBIOSEnd(); - - JMP32((uptr)DispatcherReg - ( (uptr)x86Ptr + 5 )); - } - else { - assert( branch != 3 ); - if( branch ) assert( !willbranch3 ); - else ADD32ItoM((uptr)&cpuRegs.cycle, s_nBlockCycles*9/8); - - if( willbranch3 ) { - BASEBLOCK* pblock = PC_GETBLOCK(s_nEndBlock); - assert( pc == s_nEndBlock ); - iFlushCall(FLUSH_EVERYTHING); - MOV32ItoM((uptr)&cpuRegs.pc, pc); - JMP32((uptr)pblock->pFnptr - ((uptr)x86Ptr + 5)); - branch = 3; - } - else if( !branch ) { - // didn't branch, but had to stop - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - - iFlushCall(FLUSH_EVERYTHING); - - ptr = JMP32(0); - } - } - - assert( x86Ptr >= (s8*)s_pCurBlock->pFnptr + EE_MIN_BLOCK_BYTES ); - assert( x86Ptr < recMem+REC_CACHEMEM ); - assert( recStackPtr < recStack+RECSTACK_SIZE ); - assert( x86FpuState == 0 ); - - recPtr = x86Ptr; - - assert( (g_cpuHasConstReg&g_cpuFlushedConstReg) == g_cpuHasConstReg ); - - if( !branch ) { - BASEBLOCK* pcurblock = s_pCurBlock; - u32 nEndBlock = s_nEndBlock; - s_pCurBlock = PC_GETBLOCK(pc); - assert( ptr != NULL ); - - if( s_pCurBlock->startpc != pc ) - recRecompile(pc); - - if( pcurblock->startpc == startpc ) { - assert( pcurblock->pFnptr ); - assert( s_pCurBlock->startpc == nEndBlock ); - *ptr = s_pCurBlock->pFnptr - ( (uptr)ptr + 4 ); - } - else { - recRecompile(startpc); - assert( pcurblock->pFnptr != 0 ); - } - } -} - -R5900cpu recCpu = { - recInit, - recReset, - recStep, - recExecute, - recExecuteBlock, - recExecuteVU0Block, - recExecuteVU1Block, - recEnableVU0micro, - recEnableVU1micro, - recClear, - recClearVU0, - recClearVU1, - recShutdown -}; - -#endif // PCSX2_NORECBUILD diff --git a/pcsx2v2/x86/ix86-64/iR5900Arit-64.cpp b/pcsx2v2/x86/ix86-64/iR5900Arit-64.cpp deleted file mode 100644 index dec9712..0000000 --- a/pcsx2v2/x86/ix86-64/iR5900Arit-64.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// stop compiling if NORECBUILD build (only for Visual Studio) -#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) - -#include -#include -#include - -#include "Common.h" -#include "InterTables.h" -#include "ix86/ix86.h" -#include "iR5900.h" - - -#ifdef _WIN32 -#pragma warning(disable:4244) -#pragma warning(disable:4761) -#endif - -/********************************************************* -* Register arithmetic * -* Format: OP rd, rs, rt * -*********************************************************/ - -#ifndef ARITHMETIC_RECOMPILE - -REC_FUNC(ADD); -REC_FUNC(ADDU); -REC_FUNC(DADD); -REC_FUNC(DADDU); -REC_FUNC(SUB); -REC_FUNC(SUBU); -REC_FUNC(DSUB); -REC_FUNC(DSUBU); -REC_FUNC(AND); -REC_FUNC(OR); -REC_FUNC(XOR); -REC_FUNC(NOR); -REC_FUNC(SLT); -REC_FUNC(SLTU); - -#else - -//////////////////////////////////////////////////// -void recADD( void ) { - if (!_Rd_) return; - - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if (_Rt_ != 0) { - ADD32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - } - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 1 ], EDX ); -} - -//////////////////////////////////////////////////// -void recADDU( void ) -{ - recADD( ); -} - -//////////////////////////////////////////////////// -void recDADD( void ) { - if (!_Rd_) return; - - MOV64MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Rt_ != 0 ) { - ADD64MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - } - MOV64RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], EAX ); -} - -//////////////////////////////////////////////////// -void recDADDU( void ) -{ - recDADD( ); -} - -//////////////////////////////////////////////////// -void recSUB( void ) { - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Rt_ != 0 ) { - SUB32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - } - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 1 ], EDX ); -} - -//////////////////////////////////////////////////// -void recSUBU( void ) -{ - recSUB( ); -} - -//////////////////////////////////////////////////// -void recDSUB( void ) { - if (!_Rd_) return; - - MOV64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Rt_ != 0 ) { - SUB64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - } - MOV64RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], RAX ); -} - -//////////////////////////////////////////////////// -void recDSUBU( void ) -{ - recDSUB( ); -} - -//////////////////////////////////////////////////// -void recAND( void ) { - if (!_Rd_) return; - - if (_Rt_ == _Rd_) { // Rd&= Rs - MOV64MtoR(RAX, (uptr)&cpuRegs.GPR.r[_Rs_].UL[0]); - AND64RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], RAX); - } else if (_Rs_ == _Rd_) { // Rd&= Rt - MOV64MtoR(RAX, (uptr)&cpuRegs.GPR.r[_Rt_].UL[0]); - AND64RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], RAX); - } else { // Rd = Rs & Rt - MOV64MtoR(RAX, (uptr)&cpuRegs.GPR.r[_Rs_].UL[0]); - AND64MtoR(RAX, (uptr)&cpuRegs.GPR.r[_Rt_].UL[0]); - MOV64RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], RAX); - } -} - -//////////////////////////////////////////////////// -void recOR( void ) { - if (!_Rd_) return; - - if ( ( _Rs_ == 0 ) && ( _Rt_ == 0 ) ) { - XOR64RtoR(RAX, RAX); - MOV64RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[0], RAX ); - } else if ( _Rs_ == 0 ) { - MOV64MtoR(RAX, (uptr)&cpuRegs.GPR.r[_Rt_].UL[0]); - MOV64RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], RAX); - } - else if ( _Rt_ == 0 ) { - MOV64MtoR(RAX, (uptr)&cpuRegs.GPR.r[_Rs_].UL[0]); - MOV64RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], RAX); - } - else { - MOV64MtoR(RAX, (uptr)&cpuRegs.GPR.r[_Rs_].UL[0]); - OR64MtoR(RAX, (uptr)&cpuRegs.GPR.r[_Rt_].UL[0]); - MOV64RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], RAX); - } -} - -//////////////////////////////////////////////////// -void recXOR( void ) { - if (!_Rd_) return; - - MOV64MtoR(RAX, (uptr)&cpuRegs.GPR.r[_Rs_].UL[0]); - XOR64MtoR(RAX, (uptr)&cpuRegs.GPR.r[_Rt_].UL[0]); - MOV64RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], RAX); -} - -//////////////////////////////////////////////////// -void recNOR( void ) { - if (!_Rd_) return; - - MOV64MtoR(RAX, (uptr)&cpuRegs.GPR.r[_Rs_].UL[0]); - OR64MtoR(RAX, (uptr)&cpuRegs.GPR.r[_Rt_].UL[0]); - NOT64R(RAX); - MOV64RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], RAX); -} - -//////////////////////////////////////////////////// -void recSLT( void ) { - if (!_Rd_) return; - - MOV64MtoR(EAX, (uptr)&cpuRegs.GPR.r[_Rs_].UL[0]); - CMP64MtoR(EAX, (uptr)&cpuRegs.GPR.r[_Rt_].UL[0]); - SETL8R (EAX); - AND64I32toR(EAX, 0xff); - MOV64RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], EAX); -} - -//////////////////////////////////////////////////// -void recSLTU( void ) { - if (!_Rd_) return; - - MOV64MtoR(EAX, (uptr)&cpuRegs.GPR.r[_Rs_].UL[0]); - CMP64MtoR(EAX, (uptr)&cpuRegs.GPR.r[_Rt_].UL[0]); - SBB64RtoR(EAX, EAX); - NEG64R (EAX); - MOV64RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], RAX); -} - -#endif - -#endif // PCSX2_NORECBUILD diff --git a/pcsx2v2/x86/ix86-64/iR5900AritImm-64.cpp b/pcsx2v2/x86/ix86-64/iR5900AritImm-64.cpp deleted file mode 100644 index fb1733e..0000000 --- a/pcsx2v2/x86/ix86-64/iR5900AritImm-64.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// stop compiling if NORECBUILD build (only for Visual Studio) -#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) - -#include -#include -#include - -#include "Common.h" -#include "InterTables.h" -#include "ix86/ix86.h" -#include "iR5900.h" - - -#ifdef _WIN32 -#pragma warning(disable:4244) -#pragma warning(disable:4761) -#endif - -/********************************************************* -* Arithmetic with immediate operand * -* Format: OP rt, rs, immediate * -*********************************************************/ -#ifndef ARITHMETICIMM_RECOMPILE - -REC_FUNC(ADDI); -REC_FUNC(ADDIU); -REC_FUNC(DADDI); -REC_FUNC(DADDIU); -REC_FUNC(ANDI); -REC_FUNC(ORI); -REC_FUNC(XORI); - -REC_FUNC(SLTI); -REC_FUNC(SLTIU); - -#else - -//////////////////////////////////////////////////// -void recADDI( void ) { - if (!_Rt_) return; - - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if (_Imm_ != 0) { - ADD32ItoR( EAX, _Imm_ ); - } - - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], EDX ); -} - -//////////////////////////////////////////////////// -void recADDIU( void ) -{ - recADDI( ); -} - -//////////////////////////////////////////////////// -void recDADDI( void ) { - int rsreg; - int rtreg; - - if (!_Rt_) return; - - MOV64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD64ItoR( EAX, _Imm_ ); - } - MOV64RtoM( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ], RAX ); -} - -//////////////////////////////////////////////////// -void recDADDIU( void ) -{ - recDADDI( ); -} - -//////////////////////////////////////////////////// -void recSLTIU( void ) -{ - if ( ! _Rt_ ) return; - - MOV64MtoR(RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]); - CMP64I32toR(RAX, _Imm_); - SETB8R (EAX); - AND64I32toR(EAX, 0xff); - MOV64RtoM((uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ], EAX); -} - -//////////////////////////////////////////////////// -void recSLTI( void ) -{ - if ( ! _Rt_ ) - return; - - MOV64MtoR(RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]); - CMP64I32toR(RAX, _Imm_); - SETL8R (EAX); - AND64I32toR(EAX, 0xff); - MOV64RtoM((uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ], EAX); -} - -//////////////////////////////////////////////////// -void recANDI( void ) { - if (!_Rt_) return; - - if ( _ImmU_ != 0 ) { - if (_Rs_ == _Rt_) { - MOV32ItoM( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], 0 ); - AND32ItoM( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ], _ImmU_ ); - } - else { - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - AND32ItoR( EAX, _ImmU_ ); - MOV32ItoM( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], 0 ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ], EAX ); - } - } - else { - MOV32ItoM( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], 0 ); - MOV32ItoM( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ], 0 ); - } -} - -//////////////////////////////////////////////////// -void recORI( void ) { - if (!_Rt_) return; - - if (_Rs_ == _Rt_) { - OR32ItoM( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ], _ImmU_ ); - } else { - MOV64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UD[ 0 ] ); - if ( _ImmU_ != 0 ) { - OR64ItoR( RAX, _ImmU_ ); - } - MOV64RtoM( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ], RAX ); - } -} - -//////////////////////////////////////////////////// -void recXORI( void ) { - if (!_Rt_) return; - - MOV64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UD[ 0 ] ); - XOR64ItoR( RAX, _ImmU_ ); - MOV64RtoM( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ], RAX ); -} - -#endif - -#endif // PCSX2_NORECBUILD diff --git a/pcsx2v2/x86/ix86-64/iR5900Branch-64.cpp b/pcsx2v2/x86/ix86-64/iR5900Branch-64.cpp deleted file mode 100644 index 4e988ac..0000000 --- a/pcsx2v2/x86/ix86-64/iR5900Branch-64.cpp +++ /dev/null @@ -1,537 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// stop compiling if NORECBUILD build (only for Visual Studio) -#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) - -#include -#include -#include - -#include "Common.h" -#include "InterTables.h" -#include "ix86/ix86.h" -#include "iR5900.h" - - -#ifdef _WIN32 -#pragma warning(disable:4244) -#pragma warning(disable:4761) -#endif - -/********************************************************* -* Register branch logic * -* Format: OP rs, rt, offset * -*********************************************************/ -#ifndef BRANCH_RECOMPILE - -REC_SYS(BEQ); -REC_SYS(BEQL); -REC_SYS(BNE); -REC_SYS(BNEL); -REC_SYS(BLTZ); -REC_SYS(BGTZ); -REC_SYS(BLEZ); -REC_SYS(BGEZ); -REC_SYS(BGTZL); -REC_SYS(BLTZL); -REC_SYS(BLTZAL); -REC_SYS(BLTZALL); -REC_SYS(BLEZL); -REC_SYS(BGEZL); -REC_SYS(BGEZAL); -REC_SYS(BGEZALL); - -#else - -u32 target; -//////////////////////////////////////////////////// -void recBEQ( void ) -{ - u32 branchTo = ((s32)_Imm_ * 4) + pc; - - if ( _Rs_ == _Rt_ ) - { - _clearNeededX86regs(); - _clearNeededXMMregs(); - recompileNextInstruction(1); - SetBranchImm( branchTo ); - } - else - { - MOV64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - CMP64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - j32Ptr[ 0 ] = JNE32( 0 ); - - _clearNeededX86regs(); - _clearNeededXMMregs(); - - SaveBranchState(); - recompileNextInstruction(1); - - SetBranchImm(branchTo); - - x86SetJ32( j32Ptr[ 0 ] ); - - // recopy the next inst - pc -= 4; - LoadBranchState(); - recompileNextInstruction(1); - - SetBranchImm(pc); - } -} - -//////////////////////////////////////////////////// -void recBNE( void ) -{ - u32 branchTo = ((s32)_Imm_ * 4) + pc; - - if ( _Rs_ == _Rt_ ) - { - _clearNeededX86regs(); - _clearNeededXMMregs(); - recompileNextInstruction(1); - SetBranchImm(pc); - return; - } - - MOV64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - CMP64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - j32Ptr[ 0 ] = JE32( 0 ); - - _clearNeededX86regs(); - _clearNeededXMMregs(); - - SaveBranchState(); - recompileNextInstruction(1); - - SetBranchImm(branchTo); - - x86SetJ32( j32Ptr[ 0 ] ); - - // recopy the next inst - pc -= 4; - LoadBranchState(); - recompileNextInstruction(1); - - SetBranchImm(pc); -} - -/********************************************************* -* Register branch logic * -* Format: OP rs, offset * -*********************************************************/ - -//////////////////////////////////////////////////// -void recBLTZAL( void ) -{ - SysPrintf("BLTZAL\n"); - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - iFlushCall(FLUSH_EVERYTHING); - CALLFunc( (u32)BLTZAL ); - branch = 2; -} - -//////////////////////////////////////////////////// -void recBGEZAL( void ) -{ - SysPrintf("BGEZAL\n"); - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - iFlushCall(FLUSH_EVERYTHING); - CALLFunc( (u32)BGEZAL ); - branch = 2; -} - -//////////////////////////////////////////////////// -void recBLEZ( void ) -{ - u32 branchTo = ((s32)_Imm_ * 4) + pc; - - _eeFlushAllUnused(); - - if( GPR_IS_CONST1(_Rs_) ) { - if( !(g_cpuConstRegs[_Rs_].SD[0] <= 0) ) - branchTo = pc+4; - - recompileNextInstruction(1); - SetBranchImm( branchTo ); - return; - } - - _deleteEEreg(_Rs_, 1); - - XOR64RtoR(RAX, RAX); - CMP64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]); - j32Ptr[ 0 ] = JL32( 0 ); - - _clearNeededX86regs(); - _clearNeededXMMregs(); - - SaveBranchState(); - recompileNextInstruction(1); - - SetBranchImm(branchTo); - - x86SetJ32( j32Ptr[ 0 ] ); - - // recopy the next inst - pc -= 4; - LoadBranchState(); - recompileNextInstruction(1); - - SetBranchImm(pc); -} - -//////////////////////////////////////////////////// -void recBGTZ( void ) -{ - u32 branchTo = ((s32)_Imm_ * 4) + pc; - - _eeFlushAllUnused(); - - if( GPR_IS_CONST1(_Rs_) ) { - if( !(g_cpuConstRegs[_Rs_].SD[0] > 0) ) - branchTo = pc+4; - - recompileNextInstruction(1); - SetBranchImm( branchTo ); - return; - } - - _deleteEEreg(_Rs_, 1); - - XOR64RtoR(RAX, RAX); - CMP64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]); - j32Ptr[ 0 ] = JGE32( 0 ); - - _clearNeededX86regs(); - _clearNeededXMMregs(); - - SaveBranchState(); - recompileNextInstruction(1); - - SetBranchImm(branchTo); - - x86SetJ32( j32Ptr[ 0 ] ); - - // recopy the next inst - pc -= 4; - LoadBranchState(); - recompileNextInstruction(1); - - SetBranchImm(pc); -} - -//////////////////////////////////////////////////// -void recBLTZ( void ) -{ - u32 branchTo = ((s32)_Imm_ * 4) + pc; - - _eeFlushAllUnused(); - - if( GPR_IS_CONST1(_Rs_) ) { - if( !(g_cpuConstRegs[_Rs_].SD[0] < 0) ) - branchTo = pc+4; - - recompileNextInstruction(1); - SetBranchImm( branchTo ); - return; - } - - XOR64RtoR(RAX, RAX); - CMP64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]); - j32Ptr[ 0 ] = JLE32( 0 ); - - _clearNeededX86regs(); - _clearNeededXMMregs(); - - SaveBranchState(); - recompileNextInstruction(1); - - SetBranchImm(branchTo); - - x86SetJ32( j32Ptr[ 0 ] ); - - // recopy the next inst - pc -= 4; - LoadBranchState(); - recompileNextInstruction(1); - - SetBranchImm(pc); -} - -//////////////////////////////////////////////////// -void recBGEZ( void ) -{ - u32 branchTo = ((s32)_Imm_ * 4) + pc; - - _eeFlushAllUnused(); - - if( GPR_IS_CONST1(_Rs_) ) { - if( !(g_cpuConstRegs[_Rs_].SD[0] >= 0) ) - branchTo = pc+4; - - recompileNextInstruction(1); - SetBranchImm( branchTo ); - return; - } - - XOR64RtoR(RAX, RAX); - CMP64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]); - j32Ptr[ 0 ] = JG32( 0 ); - - _clearNeededX86regs(); - _clearNeededXMMregs(); - - SaveBranchState(); - recompileNextInstruction(1); - - SetBranchImm(branchTo); - - x86SetJ32( j32Ptr[ 0 ] ); - - // recopy the next inst - pc -= 4; - LoadBranchState(); - recompileNextInstruction(1); - - SetBranchImm(pc); -} - -/********************************************************* -* Register branch logic Likely * -* Format: OP rs, offset * -*********************************************************/ - -//////////////////////////////////////////////////// -void recBLEZL( void ) -{ - u32 branchTo = ((s32)_Imm_ * 4) + pc; - - _eeFlushAllUnused(); - - if( GPR_IS_CONST1(_Rs_) ) { - if( !(g_cpuConstRegs[_Rs_].SD[0] <= 0) ) - SetBranchImm( pc + 4); - else { - _clearNeededX86regs(); - _clearNeededXMMregs(); - recompileNextInstruction(1); - SetBranchImm( branchTo ); - } - return; - } - - _deleteEEreg(_Rs_, 1); - - XOR64RtoR(RAX, RAX); - CMP64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]); - j32Ptr[ 0 ] = JL32( 0 ); - - _clearNeededX86regs(); - _clearNeededXMMregs(); - - SaveBranchState(); - recompileNextInstruction(1); - SetBranchImm(branchTo); - - x86SetJ32( j32Ptr[ 0 ] ); - - LoadBranchState(); - SetBranchImm(pc); -} - -//////////////////////////////////////////////////// -void recBGTZL( void ) -{ - u32 branchTo = ((s32)_Imm_ * 4) + pc; - - _eeFlushAllUnused(); - - if( GPR_IS_CONST1(_Rs_) ) { - if( !(g_cpuConstRegs[_Rs_].SD[0] > 0) ) - SetBranchImm( pc + 4); - else { - _clearNeededX86regs(); - _clearNeededXMMregs(); - recompileNextInstruction(1); - SetBranchImm( branchTo ); - } - return; - } - - _deleteEEreg(_Rs_, 1); - - XOR64RtoR(RAX, RAX); - CMP64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]); - j32Ptr[ 0 ] = JGE32( 0 ); - - _clearNeededX86regs(); - _clearNeededXMMregs(); - - SaveBranchState(); - recompileNextInstruction(1); - SetBranchImm(branchTo); - - x86SetJ32( j32Ptr[ 0 ] ); - - LoadBranchState(); - SetBranchImm(pc); -} - -//////////////////////////////////////////////////// -void recBLTZL( void ) -{ - u32 branchTo = ((s32)_Imm_ * 4) + pc; - - _eeFlushAllUnused(); - - if( GPR_IS_CONST1(_Rs_) ) { - if( !(g_cpuConstRegs[_Rs_].SD[0] < 0) ) - SetBranchImm( pc + 4); - else { - recompileNextInstruction(1); - SetBranchImm( branchTo ); - } - return; - } - - XOR64RtoR(RAX, RAX); - CMP64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]); - j32Ptr[ 0 ] = JLE32( 0 ); - - _clearNeededX86regs(); - _clearNeededXMMregs(); - - SaveBranchState(); - recompileNextInstruction(1); - SetBranchImm(branchTo); - - x86SetJ32( j32Ptr[ 0 ] ); - - LoadBranchState(); - SetBranchImm(pc); -} - -//////////////////////////////////////////////////// -void recBGEZL( void ) -{ -u32 branchTo = ((s32)_Imm_ * 4) + pc; - - _eeFlushAllUnused(); - - if( GPR_IS_CONST1(_Rs_) ) { - if( !(g_cpuConstRegs[_Rs_].SD[0] >= 0) ) - SetBranchImm( pc + 4); - else { - recompileNextInstruction(1); - SetBranchImm( branchTo ); - } - return; - } - - XOR64RtoR(RAX, RAX); - CMP64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]); - j32Ptr[ 0 ] = JG32( 0 ); - - _clearNeededX86regs(); - _clearNeededXMMregs(); - - SaveBranchState(); - recompileNextInstruction(1); - SetBranchImm(branchTo); - - x86SetJ32( j32Ptr[ 0 ] ); - - LoadBranchState(); - SetBranchImm(pc); -} - -//////////////////////////////////////////////////// -void recBLTZALL( void ) -{ - SysPrintf("BLTZALL\n"); - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - iFlushCall(FLUSH_EVERYTHING); - CALLFunc( (u32)BLTZALL ); - branch = 2; -} - -//////////////////////////////////////////////////// -void recBGEZALL( void ) -{ - SysPrintf("BGEZALL\n"); - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - iFlushCall(FLUSH_EVERYTHING); - CALLFunc( (u32)BGEZALL ); - branch = 2; -} - -//////////////////////////////////////////////////// -void recBEQL( void ) -{ - u32 branchTo = ((s32)_Imm_ * 4) + pc; - - MOV64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - CMP64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - j32Ptr[ 0 ] = JNE32( 0 ); - - _clearNeededX86regs(); - _clearNeededXMMregs(); - - SaveBranchState(); - recompileNextInstruction(1); - SetBranchImm(branchTo); - - x86SetJ32( j32Ptr[ 0 ] ); - - LoadBranchState(); - SetBranchImm(pc); -} - -//////////////////////////////////////////////////// -void recBNEL( void ) -{ - u32 branchTo = ((s32)_Imm_ * 4) + pc; - - MOV64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - CMP64MtoR( RAX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - j32Ptr[ 0 ] = JNE32( 0 ); - - _clearNeededX86regs(); - _clearNeededXMMregs(); - - SaveBranchState(); - SetBranchImm(pc+4); - - x86SetJ32( j32Ptr[ 0 ] ); - - // recopy the next inst - LoadBranchState(); - recompileNextInstruction(1); - SetBranchImm(branchTo); -} - -#endif - -#endif // PCSX2_NORECBUILD diff --git a/pcsx2v2/x86/ix86-64/iR5900Jump-64.cpp b/pcsx2v2/x86/ix86-64/iR5900Jump-64.cpp deleted file mode 100644 index da94b78..0000000 --- a/pcsx2v2/x86/ix86-64/iR5900Jump-64.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// stop compiling if NORECBUILD build (only for Visual Studio) -#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) - -#include -#include -#include - -#include "Common.h" -#include "InterTables.h" -#include "ix86/ix86.h" -#include "iR5900.h" - - -#ifdef _WIN32 -#pragma warning(disable:4244) -#pragma warning(disable:4761) -#endif - -/********************************************************* -* Jump to target * -* Format: OP target * -*********************************************************/ -#ifndef JUMP_RECOMPILE - -REC_SYS(J); -REC_SYS(JAL); -REC_SYS(JR); -REC_SYS(JALR); - -#else - -//////////////////////////////////////////////////// -void recJ( void ) -{ - u32 newpc = (_Target_ << 2) + ( pc & 0xf0000000 ); - recompileNextInstruction(1); - SetBranchImm(newpc); -} - -//////////////////////////////////////////////////// -void recJAL( void ) -{ - u32 newpc = (_Target_ << 2) + ( pc & 0xf0000000 ); - _deleteEEreg(31, 0); - GPR_SET_CONST(31); - g_cpuConstRegs[31].UL[0] = pc + 4; - g_cpuConstRegs[31].UL[1] = 0; - - recompileNextInstruction(1); - SetBranchImm(newpc); -} - -/********************************************************* -* Register jump * -* Format: OP rs, rd * -*********************************************************/ - -//////////////////////////////////////////////////// -void recJR( void ) -{ - SetBranchReg( _Rs_ ); -} - -//////////////////////////////////////////////////// -void recJALR( void ) -{ - _allocX86reg(ESI, X86TYPE_PCWRITEBACK, 0, MODE_WRITE); - _eeMoveGPRtoR(ESI, _Rs_); - - if ( _Rd_ ) { - _deleteEEreg(_Rd_, 0); - GPR_SET_CONST(_Rd_); - g_cpuConstRegs[_Rd_].UL[0] = pc + 4; - g_cpuConstRegs[_Rd_].UL[1] = 0; - } - - _clearNeededX86regs(); - _clearNeededXMMregs(); - recompileNextInstruction(1); - - if( x86regs[ESI].inuse ) { - assert( x86regs[ESI].type == X86TYPE_PCWRITEBACK ); - MOV32RtoM((int)&cpuRegs.pc, ESI); - x86regs[ESI].inuse = 0; - } - else { - MOV32MtoR(EAX, (u32)&g_recWriteback); - MOV32RtoM((int)&cpuRegs.pc, EAX); - } - - SetBranchReg(0xffffffff); -} - -#endif - -#endif // PCSX2_NORECBUILD diff --git a/pcsx2v2/x86/ix86-64/iR5900LoadStore-64.cpp b/pcsx2v2/x86/ix86-64/iR5900LoadStore-64.cpp deleted file mode 100644 index 5d4b276..0000000 --- a/pcsx2v2/x86/ix86-64/iR5900LoadStore-64.cpp +++ /dev/null @@ -1,423 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// stop compiling if NORECBUILD build (only for Visual Studio) -#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) - -#include -#include -#include -#include "Common.h" -#include "InterTables.h" -#include "ix86/ix86.h" -#include "iR5900.h" -#include "VU0.h" - -#ifdef _WIN32 -#pragma warning(disable:4244) -#pragma warning(disable:4761) -#endif - -/********************************************************* -* Load and store for GPR * -* Format: OP rt, offset(base) * -*********************************************************/ -#ifndef LOADSTORE_RECOMPILE - -REC_FUNC(LB); -REC_FUNC(LBU); -REC_FUNC(LH); -REC_FUNC(LHU); -REC_FUNC(LW); -REC_FUNC(LWU); -REC_FUNC(LWL); -REC_FUNC(LWR); -REC_FUNC(LD); -REC_FUNC(LDR); -REC_FUNC(LDL); -REC_FUNC(LQ); -REC_FUNC(SB); -REC_FUNC(SH); -REC_FUNC(SW); -REC_FUNC(SWL); -REC_FUNC(SWR); -REC_FUNC(SD); -REC_FUNC(SDL); -REC_FUNC(SDR); -REC_FUNC(SQ); -REC_FUNC(LWC1); -REC_FUNC(SWC1); -REC_FUNC(LQC2); -REC_FUNC(SQC2); - -void SetFastMemory(int bSetFast) {} - -#else - -static int s_bFastMemory = 0; -void SetFastMemory(int bSetFast) -{ - s_bFastMemory = bSetFast; -} - -u64 retValue; -u64 dummyValue[ 4 ]; - -//////////////////////////////////////////////////// -void recLB( void ) { - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD32ItoR( X86ARG1, _Imm_ ); - } - - if ( _Rt_ ) { - MOV64ItoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - } else { - MOV64ItoR( X86ARG2, (uptr)&dummyValue ); - } - CALLFunc( (uptr)memRead8RS ); -} - -//////////////////////////////////////////////////// -void recLBU( void ) { - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD32ItoR( X86ARG1, _Imm_ ); - } - if ( _Rt_ ) { - MOV64ItoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - } else { - MOV64ItoR( X86ARG2, (uptr)&dummyValue ); - } - iFlushCall(FLUSH_EVERYTHING); - CALLFunc((uptr)memRead8RU ); -} - -//////////////////////////////////////////////////// -void recLH( void ) { - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ){ - ADD32ItoR( X86ARG1, _Imm_ ); - } - if ( _Rt_ ) { - MOV64ItoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - } else { - MOV64ItoR( X86ARG2, (uptr)&dummyValue ); - } - iFlushCall(FLUSH_EVERYTHING); - CALLFunc((uptr)memRead16RS ); -} - -//////////////////////////////////////////////////// -void recLHU( void ) { - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD32ItoR( X86ARG1, _Imm_ ); - } - - if ( _Rt_ ) { - MOV64ItoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - } else { - MOV64ItoR( X86ARG2, (uptr)&dummyValue ); - } - CALLFunc((uptr)memRead16RU ); -} - -void tests() { - SysPrintf("Err\n"); -} - -//////////////////////////////////////////////////// -void recLW( void ) { - int rsreg; - int rtreg; - int t0reg; - int t1reg; - int t2reg; - - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD32ItoR( X86ARG1, _Imm_ ); - } - - if ( _Rt_ ) { - MOV64ItoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - } else { - MOV64ItoR( X86ARG2, (uptr)&dummyValue ); - } - CALLFunc((uptr)memRead32RS ); -} - -//////////////////////////////////////////////////// -void recLWU( void ) { - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD32ItoR( X86ARG1, _Imm_ ); - } - if ( _Rt_ ) { - MOV64ItoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - } else { - MOV64ItoR( X86ARG2, (uptr)&dummyValue ); - } - CALLFunc((uptr)memRead32RU ); -} - -void recLWL( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - CALLFunc((uptr)LWL ); -} - -void recLWR( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - CALLFunc((uptr)LWR ); -} - -void recLD( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD32ItoR( X86ARG1, _Imm_ ); - } - if ( _Rt_ ) { - MOV64ItoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - } - else { - MOV64ItoR( X86ARG2, (uptr)&dummyValue ); - } - CALLFunc((uptr)memRead64 ); -} - -void recLDL( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - CALLFunc((uptr)LDL ); -} - -void recLDR( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - CALLFunc((uptr)LDR ); -} - -void recLQ( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD32ItoR( X86ARG1, _Imm_); - } - AND32ItoR( X86ARG1, ~0xf ); - - if ( _Rt_ ) { - MOV64ItoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - } else { - MOV64ItoR( X86ARG2, (uptr)&dummyValue ); - } - CALLFunc((uptr)memRead128 ); -} - -//////////////////////////////////////////////////// -void recSB( void ) { - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD32ItoR( X86ARG1, _Imm_); - } - MOV32MtoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - CALLFunc((uptr)memWrite8 ); -} - -void recSH( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD32ItoR( X86ARG1, _Imm_ ); - } - MOV32MtoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - CALLFunc((uptr)memWrite16 ); -} - -void recSW( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD32ItoR( X86ARG1, _Imm_ ); - } - MOV32MtoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - CALLFunc((uptr)memWrite32 ); -} - -void recSWL( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - CALLFunc((uptr)SWL ); -} - -void recSWR( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - CALLFunc((uptr)SWR ); -} - -void recSD( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD32ItoR( X86ARG1, _Imm_ ); - } - MOV64MtoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - CALLFunc((uptr)memWrite64 ); -} - -void recSDL( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - CALLFunc((uptr)SDL ); -} - -void recSDR( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code ); - MOV32ItoM( (uptr)&cpuRegs.pc, pc ); - CALLFunc((uptr)SDR ); -} - -void recSQ( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) { - ADD32ItoR( X86ARG1, _Imm_ ); - } - AND32ItoR( X86ARG1, ~0xf ); - - MOV32ItoR( X86ARG2, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UD[ 0 ] ); - CALLFunc((uptr)memWrite128 ); -} - -#define _Ft_ _Rt_ -#define _Fs_ _Rd_ -#define _Fd_ _Sa_ - -// Load and store for COP1 -// Format: OP rt, offset(base) -void recLWC1( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) - ADD32ItoR( X86ARG1, _Imm_ ); - MOV64ItoR( X86ARG2, (uptr)&fpuRegs.fpr[ _Ft_ ].UL ); - - CALLFunc((uptr)memRead32 ); -} - -void recSWC1( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) - ADD32ItoR( X86ARG1, _Imm_ ); - - MOV32MtoR( X86ARG2, (uptr)&fpuRegs.fpr[ _Ft_ ].UL ); - - CALLFunc((uptr)memWrite32 ); -} - -void recLQC2( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) - ADD32ItoR( X86ARG1, _Imm_); - - if ( _Rt_ ) - MOV64ItoR(X86ARG2, (uptr)&VU0.VF[_Ft_].UD[0] ); - else - MOV64ItoR(X86ARG2, (uptr)&dummyValue ); - - CALLFunc((uptr)memRead128 ); -} - -void recSQC2( void ) -{ - iFlushCall(FLUSH_EVERYTHING); - - MOV32MtoR( X86ARG1, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if ( _Imm_ != 0 ) - ADD32ItoR( X86ARG1, _Imm_ ); - - MOV64ItoR(X86ARG2, (uptr)&VU0.VF[_Ft_].UD[0] ); - - CALLFunc((uptr)memWrite128 ); -} - -#endif - -#endif // PCSX2_NORECBUILD diff --git a/pcsx2v2/x86/ix86-64/iR5900Move-64.cpp b/pcsx2v2/x86/ix86-64/iR5900Move-64.cpp deleted file mode 100644 index cb62a54..0000000 --- a/pcsx2v2/x86/ix86-64/iR5900Move-64.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// stop compiling if NORECBUILD build (only for Visual Studio) -#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) - -#include -#include -#include - -#include "Common.h" -#include "InterTables.h" -#include "ix86/ix86.h" -#include "iR5900.h" - - -#ifdef _WIN32 -#pragma warning(disable:4244) -#pragma warning(disable:4761) -#endif - -/********************************************************* -* Shift arithmetic with constant shift * -* Format: OP rd, rt, sa * -*********************************************************/ -#ifndef MOVE_RECOMPILE - -REC_FUNC(LUI); -REC_FUNC(MFLO); -REC_FUNC(MFHI); -REC_FUNC(MTLO); -REC_FUNC(MTHI); -REC_FUNC(MOVZ); -REC_FUNC(MOVN); - -REC_FUNC( MFHI1 ); -REC_FUNC( MFLO1 ); -REC_FUNC( MTHI1 ); -REC_FUNC( MTLO1 ); - -#else -REC_FUNC(MFLO, _Rd_); -REC_FUNC(MFHI, _Rd_); -REC_FUNC(MTLO, 0); -REC_FUNC(MTHI, 0); -REC_FUNC(MOVZ, _Rd_); -REC_FUNC(MOVN, _Rd_); - -REC_FUNC( MFHI1, _Rd_ ); -REC_FUNC( MFLO1, _Rd_ ); -REC_FUNC( MTHI1, 0 ); -REC_FUNC( MTLO1, 0 ); - -/********************************************************* -* Load higher 16 bits of the first word in GPR with imm * -* Format: OP rt, immediate * -*********************************************************/ - -//////////////////////////////////////////////////// -void recLUI( void ) { - int rtreg; - - if (!_Rt_) return; - - MOV64I32toM((uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ], (s32)(_Imm_ << 16)); -} - -#endif - -#endif // PCSX2_NORECBUILD diff --git a/pcsx2v2/x86/ix86-64/iR5900MultDiv-64.cpp b/pcsx2v2/x86/ix86-64/iR5900MultDiv-64.cpp deleted file mode 100644 index 7555c66..0000000 --- a/pcsx2v2/x86/ix86-64/iR5900MultDiv-64.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// stop compiling if NORECBUILD build (only for Visual Studio) -#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) - -#include -#include -#include - -#include "Common.h" -#include "InterTables.h" -#include "ix86/ix86.h" -#include "iR5900.h" - - -#ifdef _WIN32 -#pragma warning(disable:4244) -#pragma warning(disable:4761) -#endif - -/********************************************************* -* Register mult/div & Register trap logic * -* Format: OP rs, rt * -*********************************************************/ -#ifndef MULTDIV_RECOMPILE - -REC_FUNC(MULT); -REC_FUNC(MULTU); -REC_FUNC( MULT1 ); -REC_FUNC( MULTU1 ); - -REC_FUNC(DIV); -REC_FUNC(DIVU); -REC_FUNC( DIV1 ); -REC_FUNC( DIVU1 ); - -REC_FUNC( MADD ); -REC_FUNC( MADDU ); -REC_FUNC( MADD1 ); -REC_FUNC( MADDU1 );; - -#else - -//////////////////////////////////////////////////// -void recMULT( void ) -{ - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - IMUL32M( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - - MOV32RtoR( ECX, EDX ); - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.LO.UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.LO.UL[ 1 ], EDX ); - if ( _Rd_ ) - { - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 1 ], EDX ); - } - MOV32RtoR( EAX, ECX ); - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.HI.UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.HI.UL[ 1 ], EDX ); -} - -//////////////////////////////////////////////////// -void recMULTU( void ) -{ - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - MUL32M( (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - - MOV32RtoR( ECX, EDX ); - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.LO.UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.LO.UL[ 1 ], EDX ); - if ( _Rd_ != 0 ) - { - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 1 ], EDX ); - } - MOV32RtoR( EAX, ECX ); - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.HI.UL[ 0 ], ECX ); - MOV32RtoM( (uptr)&cpuRegs.HI.UL[ 1 ], EDX ); -} - -REC_FUNC( MULT1, _Rd_ ); -REC_FUNC( MULTU1, _Rd_ ); - -//////////////////////////////////////////////////// -void recDIV( void ) -{ - MOV32MtoR( ECX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - OR32RtoR( ECX, ECX ); - j8Ptr[ 0 ] = JE8( 0 ); - - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); -// XOR32RtoR( EDX,EDX ); - CDQ(); - IDIV32R( ECX ); - - MOV32RtoR( ECX, EDX ); - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.LO.UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.LO.UL[ 1 ], EDX ); - - MOV32RtoR( EAX, ECX ); - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.HI.UL[ 0 ], ECX ); - MOV32RtoM( (uptr)&cpuRegs.HI.UL[ 1 ], EDX ); - - x86SetJ8( j8Ptr[ 0 ] ); -} - -//////////////////////////////////////////////////// -void recDIVU( void ) -{ - MOV32MtoR( ECX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - OR32RtoR( ECX, ECX ); - j8Ptr[ 0 ] = JE8( 0 ); - - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - XOR32RtoR( EDX, EDX ); - // CDQ(); - DIV32R( ECX ); - - MOV32RtoR( ECX, EDX ); - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.LO.UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.LO.UL[ 1 ], EDX ); - - MOV32RtoR( EAX,ECX ); - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.HI.UL[ 0 ], ECX ); - MOV32RtoM( (uptr)&cpuRegs.HI.UL[ 1 ], EDX ); - x86SetJ8( j8Ptr[ 0 ] ); -} - -REC_FUNC( DIV1, _Rd_ ); -REC_FUNC( DIVU1, _Rd_ ); - -REC_FUNC( MADD, _Rd_ ); -REC_FUNC( MADDU, _Rd_ ); -REC_FUNC( MADD1, _Rd_ ); -REC_FUNC( MADDU1, _Rd_ ); - -#endif - -#endif // PCSX2_NORECBUILD diff --git a/pcsx2v2/x86/ix86-64/iR5900Shift-64.cpp b/pcsx2v2/x86/ix86-64/iR5900Shift-64.cpp deleted file mode 100644 index 450927d..0000000 --- a/pcsx2v2/x86/ix86-64/iR5900Shift-64.cpp +++ /dev/null @@ -1,264 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2008 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// stop compiling if NORECBUILD build (only for Visual Studio) -#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) - -#include -#include -#include - -#include "Common.h" -#include "InterTables.h" -#include "ix86/ix86.h" -#include "iR5900.h" - - -#ifdef _WIN32 -#pragma warning(disable:4244) -#pragma warning(disable:4761) -#endif - -/********************************************************* -* Shift arithmetic with constant shift * -* Format: OP rd, rt, sa * -*********************************************************/ -#ifndef SHIFT_RECOMPILE - -REC_FUNC(SLL); -REC_FUNC(SRL); -REC_FUNC(SRA); -REC_FUNC(DSLL); -REC_FUNC(DSRL); -REC_FUNC(DSRA); -REC_FUNC(DSLL32); -REC_FUNC(DSRL32); -REC_FUNC(DSRA32); - -REC_FUNC(SLLV); -REC_FUNC(SRLV); -REC_FUNC(SRAV); -REC_FUNC(DSLLV); -REC_FUNC(DSRLV); -REC_FUNC(DSRAV); - -#else - - -//////////////////////////////////////////////////// -void recDSRA( void ) { - if (!_Rd_) return; - - MOV64MtoR( RAX, (u64)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - if ( _Sa_ != 0 ) { - SAR64ItoR( RAX, _Sa_ ); - } - MOV64RtoM( (u64)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], RAX ); -} - -//////////////////////////////////////////////////// -void recDSRA32(void) { - if (!_Rd_) return; - - MOV64MtoR( RAX, (u64)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - SAR64ItoR( RAX, _Sa_ + 32 ); - MOV64RtoM( (u64)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], RAX ); -} - -//////////////////////////////////////////////////// -void recSLL(void) { - if (!_Rd_) return; - - MOV32MtoR(EAX, (uptr)&cpuRegs.GPR.r[_Rt_].UL[0]); - if (_Sa_ != 0) { - SHL32ItoR(EAX, _Sa_); - } - CDQ(); - MOV32RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], EAX); - MOV32RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[1], EDX); -} - -//////////////////////////////////////////////////// -void recSRL(void) { - if (!_Rd_) return; - - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[_Rt_].UL[0]); - if (_Sa_ != 0) { - SHR32ItoR(EAX, _Sa_); - } - CDQ(); - MOV32RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], EAX); - MOV32RtoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[1], EDX); -} - -//////////////////////////////////////////////////// -void recSRA(void) { - if (!_Rd_) return; - - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - if ( _Sa_ != 0 ) { - SAR32ItoR( EAX, _Sa_); - } - CDQ(); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 1 ], EDX ); -} - -//////////////////////////////////////////////////// -void recDSLL(void) { - if (!_Rd_) return; - - MOV64MtoR( RAX, (u64)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - if ( _Sa_ != 0 ) { - SHL64ItoR( RAX, _Sa_ ); - } - MOV64RtoM( (u64)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], RAX ); -} - -//////////////////////////////////////////////////// -void recDSRL( void ) { - if (!_Rd_) return; - - MOV64MtoR( RAX, (u64)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - if ( _Sa_ != 0 ) { - SHR64ItoR( RAX, _Sa_ ); - } - MOV64RtoM( (u64)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], RAX ); -} - -//////////////////////////////////////////////////// -void recDSLL32(void) { - - if (!_Rd_) return; - - MOV64MtoR( RAX, (u64)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - SHL64ItoR( RAX, _Sa_ + 32 ); - MOV64RtoM( (u64)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], RAX ); -} - -//////////////////////////////////////////////////// -void recDSRL32( void ) { - - if (!_Rd_) return; - - MOV64MtoR( RAX, (u64)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - SHR64ItoR( RAX, _Sa_ + 32 ); - MOV64RtoM( (u64)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], RAX ); -} - -/********************************************************* -* Shift arithmetic with variant register shift * -* Format: OP rd, rt, rs * -*********************************************************/ - - -//////////////////////////////////////////////////// -void recSLLV( void ) { - if (!_Rd_) return; - - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - if ( _Rs_ != 0 ) { - MOV32MtoR( ECX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - AND32ItoR( ECX, 0x1f ); - SHL32CLtoR( EAX ); - } - CDQ(); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 1 ], EDX ); -} - -//////////////////////////////////////////////////// -void recSRLV( void ) { - if (!_Rd_) return; - - - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - if ( _Rs_ != 0 ) - { - MOV32MtoR( ECX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - AND32ItoR( ECX, 0x1f ); - SHR32CLtoR( EAX ); - } - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 1 ], EDX ); -} - -//////////////////////////////////////////////////// -void recSRAV( void ) { - if (!_Rd_) return; - - MOV32MtoR( EAX, (uptr)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - if ( _Rs_ != 0 ) - { - MOV32MtoR( ECX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - AND32ItoR( ECX, 0x1f ); - SAR32CLtoR( EAX ); - } - CDQ( ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], EAX ); - MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 1 ], EDX ); -} - -//////////////////////////////////////////////////// -void recDSLLV( void ) { - if (!_Rd_) return; - - MOV64MtoR( RAX, (u64)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - if ( _Rs_ != 0 ) - { - MOV32MtoR( ECX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - AND32ItoR( ECX, 0x3f ); - SHL64CLtoR( RAX ); - } - MOV64RtoM( (u64)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], RAX ); -} - -//////////////////////////////////////////////////// -void recDSRLV( void ) { - - if (!_Rd_) return; - - MOV64MtoR( RAX, (u64)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - if ( _Rs_ != 0 ) - { - MOV32MtoR( ECX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - AND32ItoR( ECX, 0x3f ); - SHR64CLtoR( RAX ); - } - MOV64RtoM( (u64)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], RAX ); -} - -//////////////////////////////////////////////////// -void recDSRAV( void ) { - if (!_Rd_) return; - - MOV64MtoR( RAX, (u64)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ); - if ( _Rs_ != 0 ) - { - MOV32MtoR( ECX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - AND32ItoR( ECX, 0x3f ); - SAR64CLtoR( RAX ); - } - MOV64RtoM( (u64)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], RAX ); -} - -#endif - - -#endif // PCSX2_NORECBUILD diff --git a/pcsx2v2/x86/ix86/Makefile.am b/pcsx2v2/x86/ix86/Makefile.am deleted file mode 100644 index b54ef7a..0000000 --- a/pcsx2v2/x86/ix86/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -INCLUDES = -I@srcdir@/.. -I@srcdir@/../../ -noinst_LIBRARIES = libix86.a - -libix86_a_SOURCES = ix86_3dnow.c ix86.c ix86_cpudetect.c ix86_fpu.c ix86.h ix86_sse.c - -if X86_64 -else -libix86_a_SOURCES += ix86_mmx.c -endif diff --git a/pcsx2v2/zlib/Makefile.am b/pcsx2v2/zlib/Makefile.am deleted file mode 100644 index ff26496..0000000 --- a/pcsx2v2/zlib/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -noinst_LIBRARIES = libpcsx2zlib.a - -libpcsx2zlib_a_SOURCES = \ -adler32.c crc32.c deflate.h inffast.c inflate.c inftrees.h trees.h zlib.h \ -crc32.h gzio.c inffast.h inflate.h uncompr.c zutil.c \ -compress.c deflate.c infback.c inffixed.h inftrees.c trees.c zconf.h zutil.h